5 require_once
"./classes/class.ilObjectGUI.php";
29 $this->
ilObjectGUI($a_data,$a_id,$a_call_by_reference,
false);
31 define (
"ILINC_DEFAULT_HTTP_PORT",80);
32 define (
"ILINC_DEFAULT_SSL_PORT",443);
33 define (
"ILINC_DEFAULT_TIMEOUT",30);
34 $lng->loadLanguageModule(
"delic");
35 $lng->loadLanguageModule(
"gmaps");
36 $lng->loadLanguageModule(
"jsmath");
37 $lng->loadLanguageModule(
"excel");
49 if (!$rbacsystem->checkAccess(
"visible,read",$this->object->getRefId()))
51 $this->ilias->raiseError($this->lng->txt(
"permission_denied"),$this->ilias->error_obj->MESSAGE);
58 $this->tpl->setVariable(
"FORMACTION",
59 $this->ctrl->getFormAction($this));
60 $this->tpl->setVariable(
"TXT_EXTT_TITLE", $this->lng->txt(
"extt_title_configure"));
62 $this->tpl->setVariable(
"TXT_EXTT_NAME", $this->lng->txt(
"extt_name"));
63 $this->tpl->setVariable(
"TXT_EXTT_ACTIVE", $this->lng->txt(
"active").
"?");
64 $this->tpl->setVariable(
"TXT_EXTT_DESC", $this->lng->txt(
"description"));
66 $this->tpl->setVariable(
"TXT_CONFIGURE", $this->lng->txt(
"extt_configure"));
67 $this->tpl->setVariable(
"TXT_EXTT_REMARK", $this->lng->txt(
"extt_remark"));
70 $this->tpl->setVariable(
"TXT_EXTT_ILINC_NAME", $this->lng->txt(
"extt_ilinc"));
71 $this->tpl->setVariable(
"TXT_EXTT_ILINC_DESC", $this->lng->txt(
"extt_ilinc_desc"));
75 $icon_ok =
"<img src=\"".ilUtil::getImagePath(
"icon_ok.gif").
"\" alt=\"".$this->lng->txt(
"enabled").
"\" title=\"".$this->lng->txt(
"enabled").
"\" border=\"0\" vspace=\"0\"/>";
76 $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\"/>";
78 $this->tpl->setVariable(
"EXTT_ILINC_ACTIVE", $this->ilias->getSetting(
'ilinc_active') ? $icon_ok : $icon_not_ok);
83 $this->ctrl->redirect($this,
"view");
100 $this->ctrl->setParameter($this,
"ref_id",$this->object->getRefId());
102 if ($rbacsystem->checkAccess(
"visible,read",$this->object->getRefId()))
104 $tabs_gui->addTarget(
"settings",
105 $this->ctrl->getLinkTarget($this,
"view"),
106 array(
"view",
"editiLinc",
"editDelicious",
"editGoogleMaps",
"editjsMath",
"editExcel",
""),
"",
"");
108 $this->lng->loadLanguageModule(
'ecs');
109 $tabs_gui->addTarget(
'ecs_server_settings',
110 $this->ctrl->getLinkTargetByClass(
'ilecssettingsgui',
'settings'));
114 if ($rbacsystem->checkAccess(
'edit_permission',$this->object->getRefId()))
116 $tabs_gui->addTarget(
"perm_settings",
117 $this->ctrl->getLinkTargetByClass(array(get_class($this),
'ilpermissiongui'),
"perm"), array(
"perm",
"info",
"owner"),
'ilpermissiongui');
128 global $rbacsystem, $rbacreview;
130 if (!$rbacsystem->checkAccess(
"write",$this->object->getRefId()))
132 $this->ilias->raiseError($this->lng->txt(
"permission_denied"),$this->ilias->error_obj->MESSAGE);
139 if (
$_SESSION[
"error_post_vars"][
"ilinc"][
"active"] ==
"1")
141 $this->tpl->setVariable(
"CHK_ILINC_ACTIVE",
"checked=\"checked\"");
144 if (
$_SESSION[
"error_post_vars"][
"ilinc"][
"akclassvalues_active"] ==
"1")
146 $this->tpl->setVariable(
"CHK_ILINC_AKCLASSVALUES_ACTIVE",
"checked=\"checked\"");
149 if (
$_SESSION[
"error_post_vars"][
"ilinc"][
"akclassvalues_required"] ==
"1")
151 $this->tpl->setVariable(
"CHK_ILINC_AKCLASSVALUES_REQUIRED",
"checked=\"checked\"");
154 $this->tpl->setVariable(
"ILINC_SERVER",
$_SESSION[
"error_post_vars"][
"ilinc"][
"server"]);
155 $this->tpl->setVariable(
"ILINC_REGISTRAR_LOGIN",
$_SESSION[
"error_post_vars"][
"ilinc"][
"registrar_login"]);
156 $this->tpl->setVariable(
"ILINC_REGISTRAR_PASSWD",
$_SESSION[
"error_post_vars"][
"ilinc"][
"registrar_passwd"]);
157 $this->tpl->setVariable(
"ILINC_CUSTOMER_ID",
$_SESSION[
"error_post_vars"][
"ilinc"][
"customer_id"]);
162 $settings = $this->ilias->getAllSettings();
164 if ($settings[
"ilinc_active"] ==
"1")
166 $this->tpl->setVariable(
"CHK_ILINC_ACTIVE",
"checked=\"checked\"");
169 $this->tpl->setVariable(
"ILINC_SERVER", $settings[
"ilinc_server"].$settings[
"ilinc_path"]);
170 $this->tpl->setVariable(
"ILINC_REGISTRAR_LOGIN", $settings[
"ilinc_registrar_login"]);
171 $this->tpl->setVariable(
"ILINC_REGISTRAR_PASSWD", $settings[
"ilinc_registrar_passwd"]);
172 $this->tpl->setVariable(
"ILINC_CUSTOMER_ID", $settings[
"ilinc_customer_id"]);
174 if (empty($settings[
"ilinc_port"]))
176 $this->tpl->setVariable(
"ILINC_PORT", ILINC_DEFAULT_HTTP_PORT);
180 $this->tpl->setVariable(
"ILINC_PORT", $settings[
"ilinc_port"]);
183 if ($settings[
"ilinc_protocol"] ==
"https")
185 $this->tpl->setVariable(
"ILINC_PROTOCOL_SSL_SEL",
"selected=\"selected\"");
189 $this->tpl->setVariable(
"ILINC_PROTOCOL_HTTP_SEL",
"selected=\"selected\"");
192 if (empty($settings[
"ilinc_timeout"]))
194 $this->tpl->setVariable(
"ILINC_TIMEOUT", ILINC_DEFAULT_TIMEOUT);
198 $this->tpl->setVariable(
"ILINC_TIMEOUT", $settings[
"ilinc_timeout"]);
201 if ($settings[
"ilinc_akclassvalues_active"] ==
"1")
203 $this->tpl->setVariable(
"CHK_ILINC_AKCLASSVALUES_ACTIVE",
"checked=\"checked\"");
206 if ($settings[
"ilinc_akclassvalues_required"] ==
"1")
208 $this->tpl->setVariable(
"CHK_ILINC_AKCLASSVALUES_REQUIRED",
"checked=\"checked\"");
214 $this->tpl->setVariable(
"FORMACTION", $this->ctrl->getFormAction($this));
215 $this->tpl->setVariable(
"TXT_ILINC_TITLE", $this->lng->txt(
"extt_ilinc_configure"));
216 $this->tpl->setVariable(
"TXT_ILINC_ACTIVE", $this->lng->txt(
"extt_ilinc_enable"));
217 $this->tpl->setVariable(
"TXT_ILINC_CONNECTION_DATA", $this->lng->txt(
"extt_ilinc_connection_data"));
218 $this->tpl->setVariable(
"TXT_ILINC_ADDITIONAL_OPTIONS", $this->lng->txt(
"extt_ilinc_additional_options"));
219 $this->tpl->setVariable(
"TXT_ILINC_SERVER", $this->lng->txt(
"extt_ilinc_server"));
220 $this->tpl->setVariable(
"TXT_ILINC_PROTOCOL_PORT", $this->lng->txt(
"extt_ilinc_protocol_port"));
221 $this->tpl->setVariable(
"TXT_ILINC_TIMEOUT", $this->lng->txt(
"extt_ilinc_timeout"));
222 $this->tpl->setVariable(
"ILINC_DEFAULT_HTTP_PORT", ILINC_DEFAULT_HTTP_PORT);
223 $this->tpl->setVariable(
"ILINC_DEFAULT_SSL_PORT", ILINC_DEFAULT_SSL_PORT);
224 $this->tpl->setVariable(
"TXT_HTTP", $this->lng->txt(
'http'));
225 $this->tpl->setVariable(
"TXT_SSL", $this->lng->txt(
'ssl'));
227 $this->tpl->setVariable(
"TXT_SECONDS", $this->lng->txt(
"seconds"));
228 $this->tpl->setVariable(
"TXT_ILINC_REGISTRAR_LOGIN", $this->lng->txt(
"extt_ilinc_registrar_login"));
229 $this->tpl->setVariable(
"TXT_ILINC_REGISTRAR_PASSWD", $this->lng->txt(
"extt_ilinc_registrar_passwd"));
230 $this->tpl->setVariable(
"TXT_ILINC_CUSTOMER_ID", $this->lng->txt(
"extt_ilinc_customer_id"));
232 $this->tpl->setVariable(
"TXT_ILINC_AKCLASSVALUES_ACTIVE", $this->lng->txt(
"extt_ilinc_akclassvalues_active"));
233 $this->tpl->setVariable(
"TXT_ILINC_AKCLASSVALUES_ACTIVE_INFO", $this->lng->txt(
"extt_ilinc_akclassvalues_active_info"));
234 $this->tpl->setVariable(
"TXT_ILINC_AKCLASSVALUES_REQUIRED", $this->lng->txt(
"extt_ilinc_akclassvalues_required"));
235 $this->tpl->setVariable(
"TXT_ILINC_AKCLASSVALUES_REQUIRED_INFO", $this->lng->txt(
"extt_ilinc_akclassvalues_required_info"));
237 $this->tpl->setVariable(
"TXT_REQUIRED_FLD", $this->lng->txt(
"required_field"));
238 $this->tpl->setVariable(
"TXT_CANCEL", $this->lng->txt(
"cancel"));
239 $this->tpl->setVariable(
"TXT_SUBMIT", $this->lng->txt(
"save"));
240 $this->tpl->setVariable(
"CMD_SUBMIT",
"saveiLinc");
253 if (!
$_POST[
"ilinc"][
"server"] or !
$_POST[
"ilinc"][
"port"] or !
$_POST[
"ilinc"][
"registrar_login"] or !
$_POST[
"ilinc"][
"registrar_passwd"] or !
$_POST[
"ilinc"][
"customer_id"])
255 $this->ilias->raiseError($this->lng->txt(
"fill_out_all_required_fields"),$this->ilias->error_obj->MESSAGE);
259 if ((preg_match(
"/^[0-9]{0,5}$/",
$_POST[
"ilinc"][
"port"])) ==
false)
261 $this->ilias->raiseError($this->lng->txt(
"err_invalid_port"),$this->ilias->error_obj->MESSAGE);
264 if (substr(
$_POST[
"ilinc"][
"server"],0,8) !=
"https://" and substr(
$_POST[
"ilinc"][
"server"],0,7) !=
"http://")
266 $_POST[
"ilinc"][
"server"] =
$_POST[
"ilinc"][
"protocol"].
"://".
$_POST[
"ilinc"][
"server"];
269 $url = parse_url(
$_POST[
"ilinc"][
"server"]);
273 $this->ilias->raiseError($this->lng->txt(
"err_invalid_server"),$this->ilias->error_obj->MESSAGE);
276 if (is_numeric(
$_POST[
"ilinc"][
"timeout"]))
278 $this->ilias->setSetting(
"ilinc_timeout",
$_POST[
"ilinc"][
"timeout"]);
282 $this->ilias->setSetting(
"ilinc_server", $url[
"host"]);
283 $this->ilias->setSetting(
"ilinc_path", $url[
"path"]);
284 $this->ilias->setSetting(
"ilinc_protocol",
$_POST[
"ilinc"][
"protocol"]);
285 $this->ilias->setSetting(
"ilinc_port",
$_POST[
"ilinc"][
"port"]);
286 $this->ilias->setSetting(
"ilinc_active",
$_POST[
"ilinc"][
"active"]);
287 $this->ilias->setSetting(
"ilinc_registrar_login",
$_POST[
"ilinc"][
"registrar_login"]);
288 $this->ilias->setSetting(
"ilinc_registrar_passwd",
$_POST[
"ilinc"][
"registrar_passwd"]);
289 $this->ilias->setSetting(
"ilinc_customer_id",
$_POST[
"ilinc"][
"customer_id"]);
291 $this->ilias->setSetting(
"ilinc_akclassvalues_active",
$_POST[
"ilinc"][
"akclassvalues_active"]);
292 $this->ilias->setSetting(
"ilinc_akclassvalues_required",
$_POST[
"ilinc"][
"akclassvalues_required"]);
295 $this->ctrl->redirect($this,
'editiLinc');
302 if (!$ilAccess->checkAccess(
"write",
"", $this->object->getRefId()))
304 $this->ilias->raiseError($this->lng->txt(
"permission_denied"),$this->ilias->error_obj->MESSAGE);
309 include_once
'class.ilSocialBookmarks.php';
311 $this->tpl->setVariable(
'ADM_CONTENT', $form->getHTML());
318 if (!$ilAccess->checkAccess(
"write",
"", $this->object->getRefId()))
320 $this->ilias->raiseError($this->lng->txt(
"permission_denied"),$this->ilias->error_obj->MESSAGE);
323 include_once
'class.ilSocialBookmarks.php';
325 if ($form->checkInput())
327 $title = $form->getInput(
'title');
328 $link = $form->getInput(
'link');
329 $file = $form->getInput(
'image_file');
330 $active = $form->getInput(
'activate');
332 $extension = pathinfo(
$file[
'name'], PATHINFO_EXTENSION);
333 $icon_path =
ilUtil::getWebspaceDir() . DIRECTORY_SEPARATOR .
'social_bm_icons' . DIRECTORY_SEPARATOR . time() .
'.' . $extension;
348 $form->setValuesByPost();
349 $this->tpl->setVariable(
'ADM_CONTENT', $form->getHTML());
357 if (!$ilAccess->checkAccess(
"write",
"", $this->object->getRefId()))
359 $this->ilias->raiseError($this->lng->txt(
"permission_denied"),$this->ilias->error_obj->MESSAGE);
362 include_once
'class.ilSocialBookmarks.php';
364 if ($form->checkInput())
366 $title = $form->getInput(
'title');
367 $link = $form->getInput(
'link');
368 $file = $form->getInput(
'image_file');
369 $active = $form->getInput(
'activate');
370 $id = $form->getInput(
'sbm_id');
376 $extension = pathinfo(
$file[
'name'], PATHINFO_EXTENSION);
377 $icon_path =
ilUtil::getWebspaceDir() . DIRECTORY_SEPARATOR .
'social_bm_icons' . DIRECTORY_SEPARATOR . time() .
'.' . $extension;
393 $form->setValuesByPost();
394 $this->tpl->setVariable(
'ADM_CONTENT', $form->getHTML());
407 if (!$ilAccess->checkAccess(
"write",
"", $this->object->getRefId()))
409 $this->ilias->raiseError($this->lng->txt(
"permission_denied"),$this->ilias->error_obj->MESSAGE);
414 include_once
'class.ilSocialBookmarks.php';
418 'sbm_id' =>
$row->sbm_id,
419 'title' =>
$row->sbm_title,
420 'link' =>
$row->sbm_link,
421 'activate' =>
$row->sbm_active
425 $form->setValuesByArray($dset);
426 $this->tpl->setVariable(
'ADM_CONTENT', $form->getHTML());
433 if (!$ilAccess->checkAccess(
"write",
"", $this->object->getRefId()))
435 $this->ilias->raiseError($this->lng->txt(
"permission_denied"),$this->ilias->error_obj->MESSAGE);
438 $ids = ((int)
$_GET[
'sbm_id']) ? array((
int)
$_GET[
'sbm_id']) :
$_POST[
'sbm_id'];
439 include_once
'class.ilSocialBookmarks.php';
448 if (!$ilAccess->checkAccess(
"write",
"", $this->object->getRefId()))
450 $this->ilias->raiseError($this->lng->txt(
"permission_denied"),$this->ilias->error_obj->MESSAGE);
453 $ids = ((int)
$_GET[
'sbm_id']) ? array((
int)
$_GET[
'sbm_id']) :
$_POST[
'sbm_id'];
454 include_once
'class.ilSocialBookmarks.php';
463 if (!$ilAccess->checkAccess(
"write",
"", $this->object->getRefId()))
465 $this->ilias->raiseError($this->lng->txt(
"permission_denied"),$this->ilias->error_obj->MESSAGE);
471 include_once(
"Services/Utilities/classes/class.ilConfirmationGUI.php");
474 $ids = ((int)
$_GET[
'sbm_id']) ? array((
int)
$_GET[
'sbm_id']) :
$_POST[
'sbm_id'];
477 $c_gui->setFormAction($ilCtrl->getFormAction($this,
"confirmDeleteSocialBookmarks"));
478 $c_gui->setHeaderText($lng->txt(
"socialbm_sure_delete_entry"));
479 $c_gui->setCancel($lng->txt(
"cancel"),
"editSocialBookmarks");
480 $c_gui->setConfirm($lng->txt(
"confirm"),
"confirmDeleteSocialBookmarks");
482 include_once
'class.ilSocialBookmarks.php';
487 $c_gui->addItem(
"sbm_id[]", $id, $entry->sbm_title .
' (' . str_replace(
'{',
'{', $entry->sbm_link) .
')');
490 $this->tpl->setVariable(
'ADM_CONTENT', $c_gui->getHTML());
497 if (!$ilAccess->checkAccess(
"write",
"", $this->object->getRefId()))
499 $this->ilias->raiseError($this->lng->txt(
"permission_denied"),$this->ilias->error_obj->MESSAGE);
503 $ids = ((int)
$_GET[
'sbm_id']) ? array((
int)
$_GET[
'sbm_id']) :
$_POST[
'sbm_id'];
504 include_once
'class.ilSocialBookmarks.php';
518 if (!$ilAccess->checkAccess(
"write",
"", $this->object->getRefId()))
520 $this->ilias->raiseError($this->lng->txt(
"permission_denied"),$this->ilias->error_obj->MESSAGE);
527 include_once(
"./Services/UIComponent/AdvancedSelectionList/classes/class.ilAdvancedSelectionListGUI.php");
529 include_once
'class.ilSocialBookmarks.php';
533 foreach($rset as
$row)
536 $current_selection_list->setListTitle($lng->txt(
"actions"));
537 $current_selection_list->setId(
"act_".$counter++);
539 $ilCtrl->setParameter($this,
'sbm_id', $row->sbm_id);
541 $current_selection_list->addItem($lng->txt(
"edit"),
'', $ilCtrl->getLinkTarget($this,
"editSocialBookmark"));
542 $current_selection_list->addItem($lng->txt(
"delete"),
'', $ilCtrl->getLinkTarget($this,
"deleteSocialBookmarks"));
545 if ($row->sbm_active)
547 $current_selection_list->addItem($lng->txt(
"socialbm_disable"),
'', $toggle_action = $ilCtrl->getLinkTarget($this,
"disableSocialBookmarks"));
551 $current_selection_list->addItem($lng->txt(
"socialbm_enable"),
'', $toggle_action = $ilCtrl->getLinkTarget($this,
"enableSocialBookmarks"));
559 'ID' => $row->sbm_id,
560 'TITLE' => $row->sbm_title,
561 'LINK' => str_replace(
'{',
'{', $row->sbm_link),
562 'ICON' => $row->sbm_icon,
563 'ACTIVE' => $row->sbm_active ? $lng->txt(
'enabled') : $lng->txt(
'disabled'),
564 'ACTIONS' => $current_selection_list->getHTML(),
565 'TOGGLE_LINK' => $toggle_action
567 $ilCtrl->clearParameters($this);
570 require_once
'Services/Table/classes/class.ilTable2GUI.php';
571 $table =
new ilTable2GUI($this,
'editSocialBookmarks');
572 $table->setFormName(
'smtable');
573 $table->setId(
'smtable');
574 $table->setPrefix(
'sm');
575 $table->setFormAction($ilCtrl->getFormAction($this,
'saveSocialBookmarks'));
576 $table->addColumn(
'',
'check',
'',
true);
577 $table->addColumn($lng->txt(
'icon'),
'');
578 $table->addColumn($lng->txt(
'title'),
'TITLE');
579 $table->addColumn($lng->txt(
'link'),
'LINK');
580 $table->addColumn($lng->txt(
'active'),
'ACTIVE');
581 $table->addColumn($lng->txt(
'actions'),
'');
582 $table->setTitle($lng->txt(
'bm_manage_social_bm'));
583 $table->setData($dset);
584 $table->setRowTemplate(
'tpl.social_bookmarking_row.html',
'Services/Administration');
585 $table->setSelectAllCheckbox(
'sbm_id');
587 $table->setDefaultOrderField(
"title");
588 $table->setDefaultOrderDirection(
"asc");
590 $table->addMultiCommand(
'enableSocialBookmarks', $lng->txt(
'socialbm_enable'));
591 $table->addMultiCommand(
'disableSocialBookmarks', $lng->txt(
'socialbm_disable'));
592 $table->addMultiCommand(
'deleteSocialBookmarks', $lng->txt(
'delete'));
594 $table->addCommandButton(
'addSocialBookmark', $lng->txt(
'create'));
596 $this->tpl->setVariable(
'ADM_CONTENT', $table->getHTML());
609 $jsMathSetting =
new ilSetting(
"jsMath");
610 $path_to_jsmath = array_key_exists(
"path_to_jsmath",
$_GET) ?
$_GET[
"path_to_jsmath"] : $jsMathSetting->get(
"path_to_jsmath");
614 include_once(
"./Services/Form/classes/class.ilPropertyFormGUI.php");
616 $form->setFormAction($ilCtrl->getFormAction($this));
617 $form->setTitle($lng->txt(
"jsmath_settings"));
621 $enable->
setChecked($jsMathSetting->get(
"enable"));
622 $enable->setInfo($lng->txt(
"jsmath_enable_jsmath_info"));
623 $form->addItem($enable);
625 $text_prop =
new ilTextInputGUI($lng->txt(
"jsmath_path_to_jsmath"),
"path_to_jsmath");
626 $text_prop->
setInfo($lng->txt(
"jsmath_path_to_jsmath_desc"));
627 $text_prop->setValue($path_to_jsmath);
628 $text_prop->setRequired(TRUE);
629 $text_prop->setMaxLength(400);
630 $text_prop->setSize(80);
631 $form->addItem($text_prop);
634 $enable->
setChecked($jsMathSetting->get(
"makedefault"));
635 $enable->setInfo($lng->txt(
"jsmath_default_setting_info"));
636 $form->addItem($enable);
638 if ($ilAccess->checkAccess(
"write",
"", $this->object->getRefId()))
640 $form->addCommandButton(
"savejsMath", $lng->txt(
"save"));
643 $tpl->setVariable(
"ADM_CONTENT", $form->getHTML());
658 include_once(
"./Services/Form/classes/class.ilPropertyFormGUI.php");
660 $form->setFormAction($ilCtrl->getFormAction($this));
661 $form->setTitle($lng->txt(
"excel_settings"));
665 $enable->
setOptions(array(
'xls' => $lng->txt(
'excel_creator_xls'),
'xlsx' => $lng->txt(
'excel_creator_xlsx')));
666 $enable->setInfo($lng->txt(
"excel_creator_info"));
667 if (!(extension_loaded(
'zip') && extension_loaded(
'xml')))
669 $enable->setValue(
'xls');
670 $enable->setDisabled(
true);
674 $enable->setValue($excelSetting->get(
'creator'));
675 $enable->setDisabled(
false);
677 $form->addItem($enable);
679 if ($ilAccess->checkAccess(
"write",
"", $this->object->getRefId()))
681 $form->addCommandButton(
"saveExcel", $lng->txt(
"save"));
684 $tpl->setVariable(
"ADM_CONTENT", $form->getHTML());
695 $excelSetting->set(
"creator", strlen(
$_POST[
"creator"]) ?
$_POST[
"creator"] :
'xls');
697 $ilCtrl->redirect($this,
"editExcel");
709 while (strrpos($path_to_jsmath,
"/") == strlen($path_to_jsmath)-1)
711 $path_to_jsmath = substr($path_to_jsmath, 0, strlen($path_to_jsmath)-1);
714 if (file_exists($path_to_jsmath .
"/" .
"jsMath.js"))
720 if (strlen($path_to_jsmath) == 0)
726 $ilCtrl->setParameter($this,
"path_to_jsmath", $path_to_jsmath);
733 $jsMathSetting =
new ilSetting(
"jsMath");
734 $jsMathSetting->set(
"path_to_jsmath", $path_to_jsmath);
739 $ilCtrl->redirect($this,
"editjsMath");
753 if (!$ilAccess->checkAccess(
"write",
"", $this->object->getRefId()))
755 $this->ilias->raiseError($this->lng->txt(
"permission_denied"),$this->ilias->error_obj->MESSAGE);
760 $api_key = $gm_set->get(
"api_key");
761 $std_latitude = $gm_set->get(
"std_latitude");
762 $std_longitude = $gm_set->get(
"std_longitude");
763 $std_zoom = $gm_set->get(
"std_zoom");
764 $api_url =
"http://www.google.com/apis/maps/signup.html";
766 include_once(
"./Services/Form/classes/class.ilPropertyFormGUI.php");
768 $form->setFormAction($ilCtrl->getFormAction($this));
769 $form->setTitle($lng->txt(
"gmaps_settings"));
774 $enable->setInfo($lng->txt(
"gmaps_enable_gmaps_info"));
775 $form->addItem($enable);
778 $text_prop =
new ilTextInputGUI($lng->txt(
"gmaps_api_key"),
"api_key");
779 $text_prop->
setInfo($lng->txt(
"gmaps_api_key_desc").
' <a href="'.$api_url.
'" target="_blank">'.$api_url.
'</a>');
780 $text_prop->setValue($api_key);
781 $text_prop->setRequired(
false);
782 $text_prop->setMaxLength(200);
783 $text_prop->setSize(60);
784 $form->addItem($text_prop);
790 $loc_prop->setLongitude($std_longitude);
791 $loc_prop->setZoom($std_zoom);
792 $form->addItem($loc_prop);
794 $form->addCommandButton(
"saveGoogleMaps", $lng->txt(
"save"));
795 $form->addCommandButton(
"view", $lng->txt(
"cancel"));
797 $tpl->setVariable(
"ADM_CONTENT", $form->getHTML());
816 $ilCtrl->redirect($this,
"editGoogleMaps");
822 $ilinc = ($a_cmd ==
'editiLinc') ?
true :
false;
823 $overview = ($a_cmd ==
'view' or $a_cmd ==
'') ?
true :
false;
825 $socialbookmarks = ($a_cmd ==
'editSocialBookmarks') ?
true :
false;
826 $gmaps = ($a_cmd ==
'editGoogleMaps') ?
true :
false;
827 $jsmath = ($a_cmd ==
'editjsMath') ?
true :
false;
828 $excel = ($a_cmd ==
'editExcel') ?
true :
false;
830 $this->tabs_gui->addSubTabTarget(
"overview", $this->ctrl->getLinkTarget($this,
"view"),
831 "",
"",
"", $overview);
834 $this->tabs_gui->addSubTabTarget(
"socialbm_extt_social_bookmarks", $this->ctrl->getLinkTarget($this,
"editSocialBookmarks"),
835 "",
"",
"", $socialbookmarks);
836 $this->tabs_gui->addSubTabTarget(
"jsmath_extt_jsmath", $this->ctrl->getLinkTarget($this,
"editjsMath"),
837 "",
"",
"", $jsmath);
838 $this->tabs_gui->addSubTabTarget(
"excel_extt_excel", $this->ctrl->getLinkTarget($this,
"editExcel"),
840 $this->tabs_gui->addSubTabTarget(
"gmaps_extt_gmaps", $this->ctrl->getLinkTarget($this,
"editGoogleMaps"),
842 $this->tabs_gui->addSubTabTarget(
"extt_ilinc", $this->ctrl->getLinkTarget($this,
"editiLinc"),
849 $next_class = $this->ctrl->getNextClass($this);
850 $cmd = $this->ctrl->getCmd();
855 case 'ilecssettingsgui':
856 include_once(
'./Services/WebServices/ECS/classes/class.ilECSSettingsGUI.php');
858 $this->tabs_gui->setTabActive(
'ecs_server_settings');
861 case 'ilpermissiongui':
862 include_once(
"Services/AccessControl/classes/class.ilPermissionGUI.php");
864 $ret =& $this->ctrl->forwardCommand($perm_gui);
865 $this->tabs_gui->setTabActive(
'perm_settings');
869 $this->tabs_gui->setTabActive(
'settings');