ILIAS  Release_3_10_x_branch Revision 61812
 All Data Structures Namespaces Files Functions Variables Groups Pages
class.ilObjExternalToolsSettingsGUI.php
Go to the documentation of this file.
1 <?php
2 /*
3  +-----------------------------------------------------------------------------+
4  | ILIAS open source |
5  +-----------------------------------------------------------------------------+
6  | Copyright (c) 1998-2006 ILIAS open source, University of Cologne |
7  | |
8  | This program is free software; you can redistribute it and/or |
9  | modify it under the terms of the GNU General Public License |
10  | as published by the Free Software Foundation; either version 2 |
11  | of the License, or (at your option) any later version. |
12  | |
13  | This program is distributed in the hope that it will be useful, |
14  | but WITHOUT ANY WARRANTY; without even the implied warranty of |
15  | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
16  | GNU General Public License for more details. |
17  | |
18  | You should have received a copy of the GNU General Public License |
19  | along with this program; if not, write to the Free Software |
20  | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. |
21  +-----------------------------------------------------------------------------+
22 */
23 
24 require_once "./classes/class.ilObjectGUI.php";
25 
26 
38 {
43  function ilObjExternalToolsSettingsGUI($a_data,$a_id,$a_call_by_reference,$a_prepare_output = true)
44  {
45  global $lng;
46 
47  $this->type = "extt";
48  $this->ilObjectGUI($a_data,$a_id,$a_call_by_reference,false);
49 
50  define ("ILINC_DEFAULT_HTTP_PORT",80);
51  define ("ILINC_DEFAULT_SSL_PORT",443);
52  define ("ILINC_DEFAULT_TIMEOUT",30);
53  $lng->loadLanguageModule("delic");
54  $lng->loadLanguageModule("gmaps");
55  $lng->loadLanguageModule("jsmath");
56  }
57 
63  function viewObject()
64  {
65  global $rbacsystem;
66 
67  if (!$rbacsystem->checkAccess("visible,read",$this->object->getRefId()))
68  {
69  $this->ilias->raiseError($this->lng->txt("permission_denied"),$this->ilias->error_obj->MESSAGE);
70  }
71 
72  $this->__initSubTabs("view");
73 
74  $this->getTemplateFile("general");
75 
76  $this->tpl->setVariable("FORMACTION",
77  $this->ctrl->getFormAction($this));
78  $this->tpl->setVariable("TXT_EXTT_TITLE", $this->lng->txt("extt_title_configure"));
79 
80  $this->tpl->setVariable("TXT_EXTT_NAME", $this->lng->txt("extt_name"));
81  $this->tpl->setVariable("TXT_EXTT_ACTIVE", $this->lng->txt("active")."?");
82  $this->tpl->setVariable("TXT_EXTT_DESC", $this->lng->txt("description"));
83 
84  $this->tpl->setVariable("TXT_CONFIGURE", $this->lng->txt("extt_configure"));
85  $this->tpl->setVariable("TXT_EXTT_REMARK", $this->lng->txt("extt_remark"));
86 
87  // ilinc
88  $this->tpl->setVariable("TXT_EXTT_ILINC_NAME", $this->lng->txt("extt_ilinc"));
89  $this->tpl->setVariable("TXT_EXTT_ILINC_DESC", $this->lng->txt("extt_ilinc_desc"));
90 
91 
92  // icon handlers
93  $icon_ok = "<img src=\"".ilUtil::getImagePath("icon_ok.gif")."\" alt=\"".$this->lng->txt("enabled")."\" title=\"".$this->lng->txt("enabled")."\" border=\"0\" vspace=\"0\"/>";
94  $icon_not_ok = "<img src=\"".ilUtil::getImagePath("icon_not_ok.gif")."\" alt=\"".$this->lng->txt("disabled")."\" title=\"".$this->lng->txt("disabled")."\" border=\"0\" vspace=\"0\"/>";
95 
96  $this->tpl->setVariable("EXTT_ILINC_ACTIVE", $this->ilias->getSetting('ilinc_active') ? $icon_ok : $icon_not_ok);
97  }
98 
99  function cancelObject()
100  {
101  ilUtil::sendInfo($this->lng->txt("msg_cancel"),true);
102  $this->ctrl->redirect($this, "view");
103  }
104 
105  function getAdminTabs(&$tabs_gui)
106  {
107  $this->getTabs($tabs_gui);
108  }
109 
115  function getTabs(&$tabs_gui)
116  {
117  global $rbacsystem;
118 
119  $this->ctrl->setParameter($this,"ref_id",$this->object->getRefId());
120 
121  if ($rbacsystem->checkAccess("visible,read",$this->object->getRefId()))
122  {
123  $tabs_gui->addTarget("settings",
124  $this->ctrl->getLinkTarget($this, "view"),
125  array("view","editiLinc","editDelicious", "editGoogleMaps","editjsMath", ""), "", "");
126 
127  $this->lng->loadLanguageModule('ecs');
128  $tabs_gui->addTarget('ecs_server_settings',
129  $this->ctrl->getLinkTargetByClass('ilecssettingsgui','settings'));
130 
131  }
132 
133  if ($rbacsystem->checkAccess('edit_permission',$this->object->getRefId()))
134  {
135  $tabs_gui->addTarget("perm_settings",
136  $this->ctrl->getLinkTargetByClass(array(get_class($this),'ilpermissiongui'), "perm"), array("perm","info","owner"), 'ilpermissiongui');
137  }
138  }
139 
145  function editiLincObject()
146  {
147  global $rbacsystem, $rbacreview;
148 
149  if (!$rbacsystem->checkAccess("write",$this->object->getRefId()))
150  {
151  $this->ilias->raiseError($this->lng->txt("permission_denied"),$this->ilias->error_obj->MESSAGE);
152  }
153 
154  $this->__initSubTabs("editiLinc");
155 
156  if ($_SESSION["error_post_vars"])
157  {
158  if ($_SESSION["error_post_vars"]["ilinc"]["active"] == "1")
159  {
160  $this->tpl->setVariable("CHK_ILINC_ACTIVE", "checked=\"checked\"");
161  }
162 
163  if ($_SESSION["error_post_vars"]["ilinc"]["akclassvalues_active"] == "1")
164  {
165  $this->tpl->setVariable("CHK_ILINC_AKCLASSVALUES_ACTIVE", "checked=\"checked\"");
166  }
167 
168  if ($_SESSION["error_post_vars"]["ilinc"]["akclassvalues_required"] == "1")
169  {
170  $this->tpl->setVariable("CHK_ILINC_AKCLASSVALUES_REQUIRED", "checked=\"checked\"");
171  }
172 
173  $this->tpl->setVariable("ILINC_SERVER", $_SESSION["error_post_vars"]["ilinc"]["server"]);
174  $this->tpl->setVariable("ILINC_REGISTRAR_LOGIN", $_SESSION["error_post_vars"]["ilinc"]["registrar_login"]);
175  $this->tpl->setVariable("ILINC_REGISTRAR_PASSWD", $_SESSION["error_post_vars"]["ilinc"]["registrar_passwd"]);
176  $this->tpl->setVariable("ILINC_CUSTOMER_ID", $_SESSION["error_post_vars"]["ilinc"]["customer_id"]);
177  }
178  else
179  {
180  // set already saved data or default value for port
181  $settings = $this->ilias->getAllSettings();
182 
183  if ($settings["ilinc_active"] == "1")
184  {
185  $this->tpl->setVariable("CHK_ILINC_ACTIVE", "checked=\"checked\"");
186  }
187 
188  $this->tpl->setVariable("ILINC_SERVER", $settings["ilinc_server"].$settings["ilinc_path"]);
189  $this->tpl->setVariable("ILINC_REGISTRAR_LOGIN", $settings["ilinc_registrar_login"]);
190  $this->tpl->setVariable("ILINC_REGISTRAR_PASSWD", $settings["ilinc_registrar_passwd"]);
191  $this->tpl->setVariable("ILINC_CUSTOMER_ID", $settings["ilinc_customer_id"]);
192 
193  if (empty($settings["ilinc_port"]))
194  {
195  $this->tpl->setVariable("ILINC_PORT", ILINC_DEFAULT_HTTP_PORT);
196  }
197  else
198  {
199  $this->tpl->setVariable("ILINC_PORT", $settings["ilinc_port"]);
200  }
201 
202  if ($settings["ilinc_protocol"] == "https")
203  {
204  $this->tpl->setVariable("ILINC_PROTOCOL_SSL_SEL", "selected=\"selected\"");
205  }
206  else
207  {
208  $this->tpl->setVariable("ILINC_PROTOCOL_HTTP_SEL", "selected=\"selected\"");
209  }
210 
211  if (empty($settings["ilinc_timeout"]))
212  {
213  $this->tpl->setVariable("ILINC_TIMEOUT", ILINC_DEFAULT_TIMEOUT);
214  }
215  else
216  {
217  $this->tpl->setVariable("ILINC_TIMEOUT", $settings["ilinc_timeout"]);
218  }
219 
220  if ($settings["ilinc_akclassvalues_active"] == "1")
221  {
222  $this->tpl->setVariable("CHK_ILINC_AKCLASSVALUES_ACTIVE", "checked=\"checked\"");
223  }
224 
225  if ($settings["ilinc_akclassvalues_required"] == "1")
226  {
227  $this->tpl->setVariable("CHK_ILINC_AKCLASSVALUES_REQUIRED", "checked=\"checked\"");
228  }
229  }
230 
231  $this->getTemplateFile("ilinc");
232 
233  $this->tpl->setVariable("FORMACTION", $this->ctrl->getFormAction($this));
234  $this->tpl->setVariable("TXT_ILINC_TITLE", $this->lng->txt("extt_ilinc_configure"));
235  $this->tpl->setVariable("TXT_ILINC_ACTIVE", $this->lng->txt("extt_ilinc_enable"));
236  $this->tpl->setVariable("TXT_ILINC_CONNECTION_DATA", $this->lng->txt("extt_ilinc_connection_data"));
237  $this->tpl->setVariable("TXT_ILINC_ADDITIONAL_OPTIONS", $this->lng->txt("extt_ilinc_additional_options"));
238  $this->tpl->setVariable("TXT_ILINC_SERVER", $this->lng->txt("extt_ilinc_server"));
239  $this->tpl->setVariable("TXT_ILINC_PROTOCOL_PORT", $this->lng->txt("extt_ilinc_protocol_port"));
240  $this->tpl->setVariable("TXT_ILINC_TIMEOUT", $this->lng->txt("extt_ilinc_timeout"));
241  $this->tpl->setVariable("ILINC_DEFAULT_HTTP_PORT", ILINC_DEFAULT_HTTP_PORT);
242  $this->tpl->setVariable("ILINC_DEFAULT_SSL_PORT", ILINC_DEFAULT_SSL_PORT);
243  $this->tpl->setVariable("TXT_HTTP", $this->lng->txt('http'));
244  $this->tpl->setVariable("TXT_SSL", $this->lng->txt('ssl'));
245 
246  $this->tpl->setVariable("TXT_SECONDS", $this->lng->txt("seconds"));
247  $this->tpl->setVariable("TXT_ILINC_REGISTRAR_LOGIN", $this->lng->txt("extt_ilinc_registrar_login"));
248  $this->tpl->setVariable("TXT_ILINC_REGISTRAR_PASSWD", $this->lng->txt("extt_ilinc_registrar_passwd"));
249  $this->tpl->setVariable("TXT_ILINC_CUSTOMER_ID", $this->lng->txt("extt_ilinc_customer_id"));
250 
251  $this->tpl->setVariable("TXT_ILINC_AKCLASSVALUES_ACTIVE", $this->lng->txt("extt_ilinc_akclassvalues_active"));
252  $this->tpl->setVariable("TXT_ILINC_AKCLASSVALUES_ACTIVE_INFO", $this->lng->txt("extt_ilinc_akclassvalues_active_info"));
253  $this->tpl->setVariable("TXT_ILINC_AKCLASSVALUES_REQUIRED", $this->lng->txt("extt_ilinc_akclassvalues_required"));
254  $this->tpl->setVariable("TXT_ILINC_AKCLASSVALUES_REQUIRED_INFO", $this->lng->txt("extt_ilinc_akclassvalues_required_info"));
255 
256  $this->tpl->setVariable("TXT_REQUIRED_FLD", $this->lng->txt("required_field"));
257  $this->tpl->setVariable("TXT_CANCEL", $this->lng->txt("cancel"));
258  $this->tpl->setVariable("TXT_SUBMIT", $this->lng->txt("save"));
259  $this->tpl->setVariable("CMD_SUBMIT", "saveiLinc");
260  }
261 
267  function saveiLincObject()
268  {
269  global $ilUser;
270 
271  // validate required data
272  if (!$_POST["ilinc"]["server"] or !$_POST["ilinc"]["port"] or !$_POST["ilinc"]["registrar_login"] or !$_POST["ilinc"]["registrar_passwd"] or !$_POST["ilinc"]["customer_id"])
273  {
274  $this->ilias->raiseError($this->lng->txt("fill_out_all_required_fields"),$this->ilias->error_obj->MESSAGE);
275  }
276 
277  // validate port
278  if ((preg_match("/^[0-9]{0,5}$/",$_POST["ilinc"]["port"])) == false)
279  {
280  $this->ilias->raiseError($this->lng->txt("err_invalid_port"),$this->ilias->error_obj->MESSAGE);
281  }
282 
283  if (substr($_POST["ilinc"]["server"],0,8) != "https://" and substr($_POST["ilinc"]["server"],0,7) != "http://")
284  {
285  $_POST["ilinc"]["server"] = $_POST["ilinc"]["protocol"]."://".$_POST["ilinc"]["server"];
286  }
287 
288  $url = parse_url($_POST["ilinc"]["server"]);
289 
290  if (!ilUtil::isIPv4($url["host"]) and !ilUtil::isDN($url["host"]))
291  {
292  $this->ilias->raiseError($this->lng->txt("err_invalid_server"),$this->ilias->error_obj->MESSAGE);
293  }
294 
295  if (is_numeric($_POST["ilinc"]["timeout"]))
296  {
297  $this->ilias->setSetting("ilinc_timeout", $_POST["ilinc"]["timeout"]);
298  }
299 
300  // all ok. save settings
301  $this->ilias->setSetting("ilinc_server", $url["host"]);
302  $this->ilias->setSetting("ilinc_path", $url["path"]);
303  $this->ilias->setSetting("ilinc_protocol", $_POST["ilinc"]["protocol"]);
304  $this->ilias->setSetting("ilinc_port", $_POST["ilinc"]["port"]);
305  $this->ilias->setSetting("ilinc_active", $_POST["ilinc"]["active"]);
306  $this->ilias->setSetting("ilinc_registrar_login", $_POST["ilinc"]["registrar_login"]);
307  $this->ilias->setSetting("ilinc_registrar_passwd", $_POST["ilinc"]["registrar_passwd"]);
308  $this->ilias->setSetting("ilinc_customer_id", $_POST["ilinc"]["customer_id"]);
309 
310  $this->ilias->setSetting("ilinc_akclassvalues_active", $_POST["ilinc"]["akclassvalues_active"]);
311  $this->ilias->setSetting("ilinc_akclassvalues_required", $_POST["ilinc"]["akclassvalues_required"]);
312 
313  ilUtil::sendInfo($this->lng->txt("extt_ilinc_settings_saved"),true);
314  $this->ctrl->redirect($this,'editiLinc');
315  }
316 
323  {
324  global $ilAccess, $rbacreview, $lng, $ilCtrl;
325 
326  $d_set = new ilSetting("delicious");
327 
328  $this->getTemplateFile("delicious");
329 
330  if (!$ilAccess->checkAccess("write", "", $this->object->getRefId()))
331  {
332  $this->ilias->raiseError($this->lng->txt("permission_denied"),$this->ilias->error_obj->MESSAGE);
333  }
334 
335  $this->__initSubTabs("editDelicious");
336 
337  if ($d_set->get("add_info_links") == "1")
338  {
339  $this->tpl->setVariable("CHK_ADD_LINKS_ACTIVE", "checked=\"checked\"");
340  }
341 
342  if ($d_set->get("user_profile") == "1")
343  {
344  $this->tpl->setVariable("CHK_ADD_PROFILE_ACTIVE", "checked=\"checked\"");
345  }
346 
347  $this->tpl->setVariable("FORMACTION", $ilCtrl->getFormAction($this));
348  $this->tpl->setVariable("TXT_DELICIOUS_SETTINGS", $lng->txt("delic_settings"));
349  $this->tpl->setVariable("TXT_ADD_DELICIOUS_LINK", $lng->txt("delic_add_info_links"));
350  $this->tpl->setVariable("TXT_ALLOW_PROFILE", $lng->txt("delic_user_profile"));
351  $this->tpl->setVariable("TXT_CANCEL", $lng->txt("cancel"));
352  $this->tpl->setVariable("TXT_SUBMIT", $lng->txt("save"));
353  $this->tpl->setVariable("CMD_SUBMIT", "saveDelicious");
354  }
355 
356 
361  {
362  global $ilCtrl;
363 
364  $d_set = new ilSetting("delicious");
365 
366  $d_set->set("add_info_links", $_POST["add_info_links"]);
367  $d_set->set("user_profile", $_POST["user_profile"]);
368  $ilCtrl->redirect($this, "editDelicious");
369  }
370 
371 
377  function editjsMathObject()
378  {
379  global $ilAccess, $rbacreview, $lng, $ilCtrl, $tpl;
380 
381  $jsMathSetting = new ilSetting("jsMath");
382  $path_to_jsmath = array_key_exists("path_to_jsmath", $_GET) ? $_GET["path_to_jsmath"] : $jsMathSetting->get("path_to_jsmath");
383 
384  if (!$ilAccess->checkAccess("write", "", $this->object->getRefId()))
385  {
386  $this->ilias->raiseError($this->lng->txt("permission_denied"),$this->ilias->error_obj->MESSAGE);
387  }
388 
389  $this->__initSubTabs("editjsMath");
390 
391  include_once("./Services/Form/classes/class.ilPropertyFormGUI.php");
392  $form = new ilPropertyFormGUI();
393  $form->setFormAction($ilCtrl->getFormAction($this));
394  $form->setTitle($lng->txt("jsmath_settings"));
395 
396  // Enable jsMath
397  $enable = new ilCheckboxInputGUI($lng->txt("jsmath_enable_jsmath"), "enable");
398  $enable->setChecked($jsMathSetting->get("enable"));
399  $enable->setInfo($lng->txt("jsmath_enable_jsmath_info"));
400  $form->addItem($enable);
401  // Path to jsMath
402  $text_prop = new ilTextInputGUI($lng->txt("jsmath_path_to_jsmath"), "path_to_jsmath");
403  $text_prop->setInfo($lng->txt("jsmath_path_to_jsmath_desc"));
404  $text_prop->setValue($path_to_jsmath);
405  $text_prop->setRequired(TRUE);
406  $text_prop->setMaxLength(400);
407  $text_prop->setSize(80);
408  $form->addItem($text_prop);
409  // jsMath as default
410  $enable = new ilCheckboxInputGUI($lng->txt("jsmath_default_setting"), "makedefault");
411  $enable->setChecked($jsMathSetting->get("makedefault"));
412  $enable->setInfo($lng->txt("jsmath_default_setting_info"));
413  $form->addItem($enable);
414 
415  $form->addCommandButton("savejsMath", $lng->txt("save"));
416  $form->addCommandButton("view", $lng->txt("cancel"));
417 
418  $tpl->setVariable("ADM_CONTENT", $form->getHTML());
419  }
420 
424  function savejsMathObject()
425  {
426  global $ilCtrl;
427  $error = FALSE;
428 
429  $path_to_jsmath = ilUtil::stripSlashes($_POST["path_to_jsmath"]);
430  while (strrpos($path_to_jsmath, "/") == strlen($path_to_jsmath)-1)
431  {
432  $path_to_jsmath = substr($path_to_jsmath, 0, strlen($path_to_jsmath)-1);
433  }
434  // check jsmath path
435  if (file_exists($path_to_jsmath . "/" . "jsMath.js"))
436  {
437  }
438  else
439  {
440  $error = TRUE;
441  if (strlen($path_to_jsmath) == 0)
442  {
443  ilUtil::sendInfo($this->lng->txt("fill_out_all_required_fields"), TRUE);
444  }
445  else
446  {
447  $ilCtrl->setParameter($this, "path_to_jsmath", $path_to_jsmath);
448  ilUtil::sendInfo($this->lng->txt("jsmath_path_not_found"), TRUE);
449  }
450  }
451 
452  if (!$error)
453  {
454  $jsMathSetting = new ilSetting("jsMath");
455  $jsMathSetting->set("path_to_jsmath", $path_to_jsmath);
456  $jsMathSetting->set("enable", ilUtil::stripSlashes($_POST["enable"]));
457  $jsMathSetting->set("makedefault", ilUtil::stripSlashes($_POST["makedefault"]));
458  }
459 
460  $ilCtrl->redirect($this, "editjsMath");
461  }
462 
469  {
470  global $ilAccess, $rbacreview, $lng, $ilCtrl, $tpl;
471 
472  $gm_set = new ilSetting("google_maps");
473 
474  if (!$ilAccess->checkAccess("write", "", $this->object->getRefId()))
475  {
476  $this->ilias->raiseError($this->lng->txt("permission_denied"),$this->ilias->error_obj->MESSAGE);
477  }
478 
479  $this->__initSubTabs("editGoogleMaps");
480 
481  $api_key = $gm_set->get("api_key");
482  $std_latitude = $gm_set->get("std_latitude");
483  $std_longitude = $gm_set->get("std_longitude");
484  $std_zoom = $gm_set->get("std_zoom");
485  $api_url = "http://www.google.com/apis/maps/signup.html";
486 
487  include_once("./Services/Form/classes/class.ilPropertyFormGUI.php");
488  $form = new ilPropertyFormGUI();
489  $form->setFormAction($ilCtrl->getFormAction($this));
490  $form->setTitle($lng->txt("gmaps_settings"));
491 
492  // Enable Google Maps
493  $enable = new ilCheckboxInputGUI($lng->txt("gmaps_enable_gmaps"), "enable");
494  $enable->setChecked($gm_set->get("enable"));
495  $enable->setInfo($lng->txt("gmaps_enable_gmaps_info"));
496  $form->addItem($enable);
497 
498  // API key
499  $text_prop = new ilTextInputGUI($lng->txt("gmaps_api_key"), "api_key");
500  $text_prop->setInfo($lng->txt("gmaps_api_key_desc").' <a href="'.$api_url.'">'.$api_url.'</a>');
501  $text_prop->setValue($api_key);
502  $text_prop->setRequired(false);
503  $text_prop->setMaxLength(200);
504  $text_prop->setSize(60);
505  $form->addItem($text_prop);
506 
507  // location property
508  $loc_prop = new ilLocationInputGUI($lng->txt("gmaps_std_location"),
509  "std_location");
510  $loc_prop->setLatitude($std_latitude);
511  $loc_prop->setLongitude($std_longitude);
512  $loc_prop->setZoom($std_zoom);
513  $form->addItem($loc_prop);
514 
515  $form->addCommandButton("saveGoogleMaps", $lng->txt("save"));
516  $form->addCommandButton("view", $lng->txt("cancel"));
517 
518  $tpl->setVariable("ADM_CONTENT", $form->getHTML());
519  }
520 
521 
526  {
527  global $ilCtrl;
528 
529  $gm_set = new ilSetting("google_maps");
530 
531  $gm_set->set("enable", ilUtil::stripSlashes($_POST["enable"]));
532  $gm_set->set("api_key", ilUtil::stripSlashes($_POST["api_key"]));
533  $gm_set->set("std_latitude", ilUtil::stripSlashes($_POST["std_location"]["latitude"]));
534  $gm_set->set("std_longitude", ilUtil::stripSlashes($_POST["std_location"]["longitude"]));
535  $gm_set->set("std_zoom", ilUtil::stripSlashes($_POST["std_location"]["zoom"]));
536 
537  $ilCtrl->redirect($this, "editGoogleMaps");
538  }
539 
540  // init sub tabs
541  function __initSubTabs($a_cmd)
542  {
543  $ilinc = ($a_cmd == 'editiLinc') ? true : false;
544  $overview = ($a_cmd == 'view' or $a_cmd == '') ? true : false;
545  $delicious = ($a_cmd == 'editDelicious') ? true : false;
546  $gmaps = ($a_cmd == 'editGoogleMaps') ? true : false;
547  $jsmath = ($a_cmd == 'editjsMath') ? true : false;
548 
549  $this->tabs_gui->addSubTabTarget("overview", $this->ctrl->getLinkTarget($this, "view"),
550  "", "", "", $overview);
551  $this->tabs_gui->addSubTabTarget("delic_extt_delicious", $this->ctrl->getLinkTarget($this, "editDelicious"),
552  "", "", "", $delicious);
553  $this->tabs_gui->addSubTabTarget("jsmath_extt_jsmath", $this->ctrl->getLinkTarget($this, "editjsMath"),
554  "", "", "", $jsmath);
555  $this->tabs_gui->addSubTabTarget("gmaps_extt_gmaps", $this->ctrl->getLinkTarget($this, "editGoogleMaps"),
556  "", "", "", $gmaps);
557  $this->tabs_gui->addSubTabTarget("extt_ilinc", $this->ctrl->getLinkTarget($this, "editiLinc"),
558  "", "", "", $ilinc);
559  }
560 
561  function &executeCommand()
562  {
563 
564  $next_class = $this->ctrl->getNextClass($this);
565  $cmd = $this->ctrl->getCmd();
566  $this->prepareOutput();
567 
568  switch($next_class)
569  {
570  case 'ilecssettingsgui':
571  include_once('./Services/WebServices/ECS/classes/class.ilECSSettingsGUI.php');
572  $this->ctrl->forwardCommand(new ilECSSettingsGUI());
573  $this->tabs_gui->setTabActive('ecs_server_settings');
574  break;
575 
576  case 'ilpermissiongui':
577  include_once("./classes/class.ilPermissionGUI.php");
578  $perm_gui =& new ilPermissionGUI($this);
579  $ret =& $this->ctrl->forwardCommand($perm_gui);
580  $this->tabs_gui->setTabActive('perm_settings');
581  break;
582 
583  default:
584  $this->tabs_gui->setTabActive('settings');
585  if(!$cmd)
586  {
587  $cmd = "view";
588  }
589  $cmd .= "Object";
590  $this->$cmd();
591 
592  break;
593  }
594  return true;
595  }
596 
597 } // END class.ilObjExternalToolsSettingsGUI
598 ?>