ILIAS  Release_3_10_x_branch Revision 61812
 All Data Structures Namespaces Files Functions Variables Groups Pages
ilObjExternalToolsSettingsGUI Class Reference

Class ilObjExternalToolsSettingsGUI. More...

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

Public Member Functions

 ilObjExternalToolsSettingsGUI ($a_data, $a_id, $a_call_by_reference, $a_prepare_output=true)
 Constructor public.
 viewObject ()
 display settings menu
 cancelObject ()
 getAdminTabs (&$tabs_gui)
 administration tabs show only permissions and trash folder
 getTabs (&$tabs_gui)
 get tabs public
 editiLincObject ()
 Configure iLinc settings.
 saveiLincObject ()
 validates all input data, save them to database if correct and active chosen extt mode
 editDeliciousObject ()
 Configure delicious settings.
 saveDeliciousObject ()
 Save Delicious Setttings.
 editjsMathObject ()
 Configure jsMath settings.
 savejsMathObject ()
 Save jsMath Setttings.
 editGoogleMapsObject ()
 Configure google maps settings.
 saveGoogleMapsObject ()
 Save Google Maps Setttings.
 __initSubTabs ($a_cmd)
executeCommand ()
 execute command
- Public Member Functions inherited from ilObjectGUI
 ilObjectGUI ($a_data, $a_id=0, $a_call_by_reference=true, $a_prepare_output=true)
 Constructor public.
 withReferences ()
 determines wether objects are referenced or not (got ref ids or not)
 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
 getCreationMode ()
 get creation mode
 assignObject ()
 prepareOutput ()
 prepare output
 setTitleAndDescription ()
 called by prepare output
 showUpperIcon ()
 showMountWebfolderIcon ()
 setTabs ()
 set admin tabs public
 setAdminTabs ()
 set admin tabs public
 getHTML ()
 setActions ($a_actions="")
 set possible actions for objects in list.
 setSubObjects ($a_sub_objects="")
 set possible subobjects for this object.
 setLocator ()
 set Locator
 addLocatorItems ()
 should be overwritten to add object specific items (repository items are preloaded)
 omitLocator ($a_omit=true)
 addAdminLocatorItems ()
 should be overwritten to add object specific items (repository items are preloaded)
 undeleteObject ()
 get object back from trash
 insertSavedNodes ($a_source_id, $a_dest_id, $a_tree_id, &$a_affected_ids)
 recursive method to insert all saved nodes of the clipboard (maybe this function could be moved to a rbac class ?)
 confirmedDeleteObject ()
 confirmed deletion if object -> objects are moved to trash
 cancelDeleteObject ()
 cancel deletion of object
 removeFromSystemObject ()
 remove objects from trash bin and all entries therefore every object needs a specific deleteObject() method
 removeDeletedNodes ($a_node_id, $a_checked, $a_delete_objects, &$a_affected_ids)
 remove already deleted objects within the objects in trash recursive function
 createObject ()
 create new object form
 cancelObject ($in_rep=false)
 cancel action and go back to previous page public
 saveObject ()
 save object
 importObject ()
 import new object form
 editObject ()
 edit object
 displayEditForm ($fields)
 display edit form (usually called by editObject)
 updateObject ()
 updates object entry in object_data
 afterUpdate ()
 permObject ()
 show permissions of current node
 getFormAction ($a_cmd, $a_formaction="")
 get form action for command (command is method name without "Object", e.g.
 setFormAction ($a_cmd, $a_formaction)
 set specific form action for command
 getReturnLocation ($a_cmd, $a_location="")
 get return location for command (command is method name without "Object", e.g.
 setReturnLocation ($a_cmd, $a_location)
 set specific return location for command
 getTargetFrame ($a_cmd, $a_target_frame="")
 get target frame for command (command is method name without "Object", e.g.
 setTargetFrame ($a_cmd, $a_target_frame)
 set specific target frame for command
 permSaveObject ()
 save permissions
 isVisible ($a_ref_id, $a_type)
 displayList ()
 display object list
 deleteObject ($a_error=false)
 display deletion confirmation screen only for referenced objects.
 trashObject ()
 show trash content of object
 addRoleObject ()
 adds a local role This method is only called when choose the option 'you may add local roles'.
 showActions ($with_subobjects=false)
 show possible action (form buttons)
 getActions ()
 Get Actions.
 showPossibleSubObjects ()
 show possible subobjects (pulldown menu)
 getTemplateFile ($a_cmd, $a_type="")
 get a template blockfile format: tpl.
 getTitlesByRefId ($a_ref_ids)
 get Titles of objects this method is used for error messages in methods cut/copy/paste
 __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
 __showClipboardTable ($a_result_set, $a_from="")
 infoObject ()
 __buildRoleFilterSelect ()
 __filterRoles ($a_roles, $a_filter)
 ownerObject ()
 changeOwnerObject ()
 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
 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.
 fillCloneSearchTemplate ($a_tpl_varname, $a_type)
 Add an object search in case the number of existing objects is too big to offer a selection list.
 cloneAllObject ()
 Clone single (not container object) Method is overwritten in ilContainerGUI.
 copyWizardHasOptions ($a_mode)
 Check if there is any modules specific option.
 getCenterColumnHTML ()
 Get center column.
 getRightColumnHTML ()
 Display right column.
 setColumnSettings ($column_gui)
 May be overwritten in subclasses.
 checkPermission ($a_perm, $a_cmd="")

Additional Inherited Members

- 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
- Protected Member Functions inherited from ilObjectGUI
 searchCloneSourceObject ()
 Search clone source by title.
 buildCloneSelect ($existing_objs)
 Build a select box for clonable objects (permission write)

Detailed Description

Member Function Documentation

ilObjExternalToolsSettingsGUI::__initSubTabs (   $a_cmd)

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

Referenced by editDeliciousObject(), editGoogleMapsObject(), editiLincObject(), editjsMathObject(), and viewObject().

{
$ilinc = ($a_cmd == 'editiLinc') ? true : false;
$overview = ($a_cmd == 'view' or $a_cmd == '') ? true : false;
$delicious = ($a_cmd == 'editDelicious') ? true : false;
$gmaps = ($a_cmd == 'editGoogleMaps') ? true : false;
$jsmath = ($a_cmd == 'editjsMath') ? true : false;
$this->tabs_gui->addSubTabTarget("overview", $this->ctrl->getLinkTarget($this, "view"),
"", "", "", $overview);
$this->tabs_gui->addSubTabTarget("delic_extt_delicious", $this->ctrl->getLinkTarget($this, "editDelicious"),
"", "", "", $delicious);
$this->tabs_gui->addSubTabTarget("jsmath_extt_jsmath", $this->ctrl->getLinkTarget($this, "editjsMath"),
"", "", "", $jsmath);
$this->tabs_gui->addSubTabTarget("gmaps_extt_gmaps", $this->ctrl->getLinkTarget($this, "editGoogleMaps"),
"", "", "", $gmaps);
$this->tabs_gui->addSubTabTarget("extt_ilinc", $this->ctrl->getLinkTarget($this, "editiLinc"),
"", "", "", $ilinc);
}

+ Here is the caller graph for this function:

ilObjExternalToolsSettingsGUI::cancelObject ( )

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

References ilUtil\sendInfo().

{
ilUtil::sendInfo($this->lng->txt("msg_cancel"),true);
$this->ctrl->redirect($this, "view");
}

+ Here is the call graph for this function:

ilObjExternalToolsSettingsGUI::editDeliciousObject ( )

Configure delicious settings.

public

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

References $ilCtrl, ilObjectGUI\$lng, __initSubTabs(), and ilObjectGUI\getTemplateFile().

{
global $ilAccess, $rbacreview, $lng, $ilCtrl;
$d_set = new ilSetting("delicious");
$this->getTemplateFile("delicious");
if (!$ilAccess->checkAccess("write", "", $this->object->getRefId()))
{
$this->ilias->raiseError($this->lng->txt("permission_denied"),$this->ilias->error_obj->MESSAGE);
}
$this->__initSubTabs("editDelicious");
if ($d_set->get("add_info_links") == "1")
{
$this->tpl->setVariable("CHK_ADD_LINKS_ACTIVE", "checked=\"checked\"");
}
if ($d_set->get("user_profile") == "1")
{
$this->tpl->setVariable("CHK_ADD_PROFILE_ACTIVE", "checked=\"checked\"");
}
$this->tpl->setVariable("FORMACTION", $ilCtrl->getFormAction($this));
$this->tpl->setVariable("TXT_DELICIOUS_SETTINGS", $lng->txt("delic_settings"));
$this->tpl->setVariable("TXT_ADD_DELICIOUS_LINK", $lng->txt("delic_add_info_links"));
$this->tpl->setVariable("TXT_ALLOW_PROFILE", $lng->txt("delic_user_profile"));
$this->tpl->setVariable("TXT_CANCEL", $lng->txt("cancel"));
$this->tpl->setVariable("TXT_SUBMIT", $lng->txt("save"));
$this->tpl->setVariable("CMD_SUBMIT", "saveDelicious");
}

+ Here is the call graph for this function:

ilObjExternalToolsSettingsGUI::editGoogleMapsObject ( )

Configure google maps settings.

public

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

References $ilCtrl, ilObjectGUI\$lng, ilObjectGUI\$tpl, __initSubTabs(), ilCheckboxInputGUI\setChecked(), ilFormPropertyGUI\setInfo(), and ilLocationInputGUI\setLatitude().

{
global $ilAccess, $rbacreview, $lng, $ilCtrl, $tpl;
$gm_set = new ilSetting("google_maps");
if (!$ilAccess->checkAccess("write", "", $this->object->getRefId()))
{
$this->ilias->raiseError($this->lng->txt("permission_denied"),$this->ilias->error_obj->MESSAGE);
}
$this->__initSubTabs("editGoogleMaps");
$api_key = $gm_set->get("api_key");
$std_latitude = $gm_set->get("std_latitude");
$std_longitude = $gm_set->get("std_longitude");
$std_zoom = $gm_set->get("std_zoom");
$api_url = "http://www.google.com/apis/maps/signup.html";
include_once("./Services/Form/classes/class.ilPropertyFormGUI.php");
$form = new ilPropertyFormGUI();
$form->setFormAction($ilCtrl->getFormAction($this));
$form->setTitle($lng->txt("gmaps_settings"));
// Enable Google Maps
$enable = new ilCheckboxInputGUI($lng->txt("gmaps_enable_gmaps"), "enable");
$enable->setChecked($gm_set->get("enable"));
$enable->setInfo($lng->txt("gmaps_enable_gmaps_info"));
$form->addItem($enable);
// API key
$text_prop = new ilTextInputGUI($lng->txt("gmaps_api_key"), "api_key");
$text_prop->setInfo($lng->txt("gmaps_api_key_desc").' <a href="'.$api_url.'">'.$api_url.'</a>');
$text_prop->setValue($api_key);
$text_prop->setRequired(false);
$text_prop->setMaxLength(200);
$text_prop->setSize(60);
$form->addItem($text_prop);
// location property
$loc_prop = new ilLocationInputGUI($lng->txt("gmaps_std_location"),
"std_location");
$loc_prop->setLatitude($std_latitude);
$loc_prop->setLongitude($std_longitude);
$loc_prop->setZoom($std_zoom);
$form->addItem($loc_prop);
$form->addCommandButton("saveGoogleMaps", $lng->txt("save"));
$form->addCommandButton("view", $lng->txt("cancel"));
$tpl->setVariable("ADM_CONTENT", $form->getHTML());
}

+ Here is the call graph for this function:

ilObjExternalToolsSettingsGUI::editiLincObject ( )

Configure iLinc settings.

public

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

References $_SESSION, __initSubTabs(), and ilObjectGUI\getTemplateFile().

{
global $rbacsystem, $rbacreview;
if (!$rbacsystem->checkAccess("write",$this->object->getRefId()))
{
$this->ilias->raiseError($this->lng->txt("permission_denied"),$this->ilias->error_obj->MESSAGE);
}
$this->__initSubTabs("editiLinc");
if ($_SESSION["error_post_vars"])
{
if ($_SESSION["error_post_vars"]["ilinc"]["active"] == "1")
{
$this->tpl->setVariable("CHK_ILINC_ACTIVE", "checked=\"checked\"");
}
if ($_SESSION["error_post_vars"]["ilinc"]["akclassvalues_active"] == "1")
{
$this->tpl->setVariable("CHK_ILINC_AKCLASSVALUES_ACTIVE", "checked=\"checked\"");
}
if ($_SESSION["error_post_vars"]["ilinc"]["akclassvalues_required"] == "1")
{
$this->tpl->setVariable("CHK_ILINC_AKCLASSVALUES_REQUIRED", "checked=\"checked\"");
}
$this->tpl->setVariable("ILINC_SERVER", $_SESSION["error_post_vars"]["ilinc"]["server"]);
$this->tpl->setVariable("ILINC_REGISTRAR_LOGIN", $_SESSION["error_post_vars"]["ilinc"]["registrar_login"]);
$this->tpl->setVariable("ILINC_REGISTRAR_PASSWD", $_SESSION["error_post_vars"]["ilinc"]["registrar_passwd"]);
$this->tpl->setVariable("ILINC_CUSTOMER_ID", $_SESSION["error_post_vars"]["ilinc"]["customer_id"]);
}
else
{
// set already saved data or default value for port
$settings = $this->ilias->getAllSettings();
if ($settings["ilinc_active"] == "1")
{
$this->tpl->setVariable("CHK_ILINC_ACTIVE", "checked=\"checked\"");
}
$this->tpl->setVariable("ILINC_SERVER", $settings["ilinc_server"].$settings["ilinc_path"]);
$this->tpl->setVariable("ILINC_REGISTRAR_LOGIN", $settings["ilinc_registrar_login"]);
$this->tpl->setVariable("ILINC_REGISTRAR_PASSWD", $settings["ilinc_registrar_passwd"]);
$this->tpl->setVariable("ILINC_CUSTOMER_ID", $settings["ilinc_customer_id"]);
if (empty($settings["ilinc_port"]))
{
$this->tpl->setVariable("ILINC_PORT", ILINC_DEFAULT_HTTP_PORT);
}
else
{
$this->tpl->setVariable("ILINC_PORT", $settings["ilinc_port"]);
}
if ($settings["ilinc_protocol"] == "https")
{
$this->tpl->setVariable("ILINC_PROTOCOL_SSL_SEL", "selected=\"selected\"");
}
else
{
$this->tpl->setVariable("ILINC_PROTOCOL_HTTP_SEL", "selected=\"selected\"");
}
if (empty($settings["ilinc_timeout"]))
{
$this->tpl->setVariable("ILINC_TIMEOUT", ILINC_DEFAULT_TIMEOUT);
}
else
{
$this->tpl->setVariable("ILINC_TIMEOUT", $settings["ilinc_timeout"]);
}
if ($settings["ilinc_akclassvalues_active"] == "1")
{
$this->tpl->setVariable("CHK_ILINC_AKCLASSVALUES_ACTIVE", "checked=\"checked\"");
}
if ($settings["ilinc_akclassvalues_required"] == "1")
{
$this->tpl->setVariable("CHK_ILINC_AKCLASSVALUES_REQUIRED", "checked=\"checked\"");
}
}
$this->getTemplateFile("ilinc");
$this->tpl->setVariable("FORMACTION", $this->ctrl->getFormAction($this));
$this->tpl->setVariable("TXT_ILINC_TITLE", $this->lng->txt("extt_ilinc_configure"));
$this->tpl->setVariable("TXT_ILINC_ACTIVE", $this->lng->txt("extt_ilinc_enable"));
$this->tpl->setVariable("TXT_ILINC_CONNECTION_DATA", $this->lng->txt("extt_ilinc_connection_data"));
$this->tpl->setVariable("TXT_ILINC_ADDITIONAL_OPTIONS", $this->lng->txt("extt_ilinc_additional_options"));
$this->tpl->setVariable("TXT_ILINC_SERVER", $this->lng->txt("extt_ilinc_server"));
$this->tpl->setVariable("TXT_ILINC_PROTOCOL_PORT", $this->lng->txt("extt_ilinc_protocol_port"));
$this->tpl->setVariable("TXT_ILINC_TIMEOUT", $this->lng->txt("extt_ilinc_timeout"));
$this->tpl->setVariable("ILINC_DEFAULT_HTTP_PORT", ILINC_DEFAULT_HTTP_PORT);
$this->tpl->setVariable("ILINC_DEFAULT_SSL_PORT", ILINC_DEFAULT_SSL_PORT);
$this->tpl->setVariable("TXT_HTTP", $this->lng->txt('http'));
$this->tpl->setVariable("TXT_SSL", $this->lng->txt('ssl'));
$this->tpl->setVariable("TXT_SECONDS", $this->lng->txt("seconds"));
$this->tpl->setVariable("TXT_ILINC_REGISTRAR_LOGIN", $this->lng->txt("extt_ilinc_registrar_login"));
$this->tpl->setVariable("TXT_ILINC_REGISTRAR_PASSWD", $this->lng->txt("extt_ilinc_registrar_passwd"));
$this->tpl->setVariable("TXT_ILINC_CUSTOMER_ID", $this->lng->txt("extt_ilinc_customer_id"));
$this->tpl->setVariable("TXT_ILINC_AKCLASSVALUES_ACTIVE", $this->lng->txt("extt_ilinc_akclassvalues_active"));
$this->tpl->setVariable("TXT_ILINC_AKCLASSVALUES_ACTIVE_INFO", $this->lng->txt("extt_ilinc_akclassvalues_active_info"));
$this->tpl->setVariable("TXT_ILINC_AKCLASSVALUES_REQUIRED", $this->lng->txt("extt_ilinc_akclassvalues_required"));
$this->tpl->setVariable("TXT_ILINC_AKCLASSVALUES_REQUIRED_INFO", $this->lng->txt("extt_ilinc_akclassvalues_required_info"));
$this->tpl->setVariable("TXT_REQUIRED_FLD", $this->lng->txt("required_field"));
$this->tpl->setVariable("TXT_CANCEL", $this->lng->txt("cancel"));
$this->tpl->setVariable("TXT_SUBMIT", $this->lng->txt("save"));
$this->tpl->setVariable("CMD_SUBMIT", "saveiLinc");
}

+ Here is the call graph for this function:

ilObjExternalToolsSettingsGUI::editjsMathObject ( )

Configure jsMath settings.

public

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

References $_GET, $ilCtrl, ilObjectGUI\$lng, ilObjectGUI\$tpl, __initSubTabs(), ilCheckboxInputGUI\setChecked(), and ilFormPropertyGUI\setInfo().

{
global $ilAccess, $rbacreview, $lng, $ilCtrl, $tpl;
$jsMathSetting = new ilSetting("jsMath");
$path_to_jsmath = array_key_exists("path_to_jsmath", $_GET) ? $_GET["path_to_jsmath"] : $jsMathSetting->get("path_to_jsmath");
if (!$ilAccess->checkAccess("write", "", $this->object->getRefId()))
{
$this->ilias->raiseError($this->lng->txt("permission_denied"),$this->ilias->error_obj->MESSAGE);
}
$this->__initSubTabs("editjsMath");
include_once("./Services/Form/classes/class.ilPropertyFormGUI.php");
$form = new ilPropertyFormGUI();
$form->setFormAction($ilCtrl->getFormAction($this));
$form->setTitle($lng->txt("jsmath_settings"));
// Enable jsMath
$enable = new ilCheckboxInputGUI($lng->txt("jsmath_enable_jsmath"), "enable");
$enable->setChecked($jsMathSetting->get("enable"));
$enable->setInfo($lng->txt("jsmath_enable_jsmath_info"));
$form->addItem($enable);
// Path to jsMath
$text_prop = new ilTextInputGUI($lng->txt("jsmath_path_to_jsmath"), "path_to_jsmath");
$text_prop->setInfo($lng->txt("jsmath_path_to_jsmath_desc"));
$text_prop->setValue($path_to_jsmath);
$text_prop->setRequired(TRUE);
$text_prop->setMaxLength(400);
$text_prop->setSize(80);
$form->addItem($text_prop);
// jsMath as default
$enable = new ilCheckboxInputGUI($lng->txt("jsmath_default_setting"), "makedefault");
$enable->setChecked($jsMathSetting->get("makedefault"));
$enable->setInfo($lng->txt("jsmath_default_setting_info"));
$form->addItem($enable);
$form->addCommandButton("savejsMath", $lng->txt("save"));
$form->addCommandButton("view", $lng->txt("cancel"));
$tpl->setVariable("ADM_CONTENT", $form->getHTML());
}

+ Here is the call graph for this function:

& ilObjExternalToolsSettingsGUI::executeCommand ( )

execute command

Reimplemented from ilObjectGUI.

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

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

{
$next_class = $this->ctrl->getNextClass($this);
$cmd = $this->ctrl->getCmd();
$this->prepareOutput();
switch($next_class)
{
case 'ilecssettingsgui':
include_once('./Services/WebServices/ECS/classes/class.ilECSSettingsGUI.php');
$this->ctrl->forwardCommand(new ilECSSettingsGUI());
$this->tabs_gui->setTabActive('ecs_server_settings');
break;
case 'ilpermissiongui':
include_once("./classes/class.ilPermissionGUI.php");
$perm_gui =& new ilPermissionGUI($this);
$ret =& $this->ctrl->forwardCommand($perm_gui);
$this->tabs_gui->setTabActive('perm_settings');
break;
default:
$this->tabs_gui->setTabActive('settings');
if(!$cmd)
{
$cmd = "view";
}
$cmd .= "Object";
$this->$cmd();
break;
}
return true;
}

+ Here is the call graph for this function:

ilObjExternalToolsSettingsGUI::getAdminTabs ( $tabs_gui)

administration tabs show only permissions and trash folder

Reimplemented from ilObjectGUI.

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

References getTabs().

{
$this->getTabs($tabs_gui);
}

+ Here is the call graph for this function:

ilObjExternalToolsSettingsGUI::getTabs ( $tabs_gui)

get tabs public

Parameters
objecttabs gui object

Reimplemented from ilObjectGUI.

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

Referenced by getAdminTabs().

{
global $rbacsystem;
$this->ctrl->setParameter($this,"ref_id",$this->object->getRefId());
if ($rbacsystem->checkAccess("visible,read",$this->object->getRefId()))
{
$tabs_gui->addTarget("settings",
$this->ctrl->getLinkTarget($this, "view"),
array("view","editiLinc","editDelicious", "editGoogleMaps","editjsMath", ""), "", "");
$this->lng->loadLanguageModule('ecs');
$tabs_gui->addTarget('ecs_server_settings',
$this->ctrl->getLinkTargetByClass('ilecssettingsgui','settings'));
}
if ($rbacsystem->checkAccess('edit_permission',$this->object->getRefId()))
{
$tabs_gui->addTarget("perm_settings",
$this->ctrl->getLinkTargetByClass(array(get_class($this),'ilpermissiongui'), "perm"), array("perm","info","owner"), 'ilpermissiongui');
}
}

+ Here is the caller graph for this function:

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

Constructor public.

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

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

{
global $lng;
$this->type = "extt";
$this->ilObjectGUI($a_data,$a_id,$a_call_by_reference,false);
define ("ILINC_DEFAULT_HTTP_PORT",80);
define ("ILINC_DEFAULT_SSL_PORT",443);
define ("ILINC_DEFAULT_TIMEOUT",30);
$lng->loadLanguageModule("delic");
$lng->loadLanguageModule("gmaps");
$lng->loadLanguageModule("jsmath");
}

+ Here is the call graph for this function:

ilObjExternalToolsSettingsGUI::saveDeliciousObject ( )

Save Delicious Setttings.

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

References $ilCtrl.

{
global $ilCtrl;
$d_set = new ilSetting("delicious");
$d_set->set("add_info_links", $_POST["add_info_links"]);
$d_set->set("user_profile", $_POST["user_profile"]);
$ilCtrl->redirect($this, "editDelicious");
}
ilObjExternalToolsSettingsGUI::saveGoogleMapsObject ( )

Save Google Maps Setttings.

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

References $ilCtrl, and ilUtil\stripSlashes().

{
global $ilCtrl;
$gm_set = new ilSetting("google_maps");
$gm_set->set("enable", ilUtil::stripSlashes($_POST["enable"]));
$gm_set->set("api_key", ilUtil::stripSlashes($_POST["api_key"]));
$gm_set->set("std_latitude", ilUtil::stripSlashes($_POST["std_location"]["latitude"]));
$gm_set->set("std_longitude", ilUtil::stripSlashes($_POST["std_location"]["longitude"]));
$gm_set->set("std_zoom", ilUtil::stripSlashes($_POST["std_location"]["zoom"]));
$ilCtrl->redirect($this, "editGoogleMaps");
}

+ Here is the call graph for this function:

ilObjExternalToolsSettingsGUI::saveiLincObject ( )

validates all input data, save them to database if correct and active chosen extt mode

public

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

References ilUtil\isDN(), ilUtil\isIPv4(), and ilUtil\sendInfo().

{
global $ilUser;
// validate required data
if (!$_POST["ilinc"]["server"] or !$_POST["ilinc"]["port"] or !$_POST["ilinc"]["registrar_login"] or !$_POST["ilinc"]["registrar_passwd"] or !$_POST["ilinc"]["customer_id"])
{
$this->ilias->raiseError($this->lng->txt("fill_out_all_required_fields"),$this->ilias->error_obj->MESSAGE);
}
// validate port
if ((preg_match("/^[0-9]{0,5}$/",$_POST["ilinc"]["port"])) == false)
{
$this->ilias->raiseError($this->lng->txt("err_invalid_port"),$this->ilias->error_obj->MESSAGE);
}
if (substr($_POST["ilinc"]["server"],0,8) != "https://" and substr($_POST["ilinc"]["server"],0,7) != "http://")
{
$_POST["ilinc"]["server"] = $_POST["ilinc"]["protocol"]."://".$_POST["ilinc"]["server"];
}
$url = parse_url($_POST["ilinc"]["server"]);
if (!ilUtil::isIPv4($url["host"]) and !ilUtil::isDN($url["host"]))
{
$this->ilias->raiseError($this->lng->txt("err_invalid_server"),$this->ilias->error_obj->MESSAGE);
}
if (is_numeric($_POST["ilinc"]["timeout"]))
{
$this->ilias->setSetting("ilinc_timeout", $_POST["ilinc"]["timeout"]);
}
// all ok. save settings
$this->ilias->setSetting("ilinc_server", $url["host"]);
$this->ilias->setSetting("ilinc_path", $url["path"]);
$this->ilias->setSetting("ilinc_protocol", $_POST["ilinc"]["protocol"]);
$this->ilias->setSetting("ilinc_port", $_POST["ilinc"]["port"]);
$this->ilias->setSetting("ilinc_active", $_POST["ilinc"]["active"]);
$this->ilias->setSetting("ilinc_registrar_login", $_POST["ilinc"]["registrar_login"]);
$this->ilias->setSetting("ilinc_registrar_passwd", $_POST["ilinc"]["registrar_passwd"]);
$this->ilias->setSetting("ilinc_customer_id", $_POST["ilinc"]["customer_id"]);
$this->ilias->setSetting("ilinc_akclassvalues_active", $_POST["ilinc"]["akclassvalues_active"]);
$this->ilias->setSetting("ilinc_akclassvalues_required", $_POST["ilinc"]["akclassvalues_required"]);
ilUtil::sendInfo($this->lng->txt("extt_ilinc_settings_saved"),true);
$this->ctrl->redirect($this,'editiLinc');
}

+ Here is the call graph for this function:

ilObjExternalToolsSettingsGUI::savejsMathObject ( )

Save jsMath Setttings.

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

References $ilCtrl, ilUtil\sendInfo(), and ilUtil\stripSlashes().

{
global $ilCtrl;
$error = FALSE;
$path_to_jsmath = ilUtil::stripSlashes($_POST["path_to_jsmath"]);
while (strrpos($path_to_jsmath, "/") == strlen($path_to_jsmath)-1)
{
$path_to_jsmath = substr($path_to_jsmath, 0, strlen($path_to_jsmath)-1);
}
// check jsmath path
if (file_exists($path_to_jsmath . "/" . "jsMath.js"))
{
}
else
{
$error = TRUE;
if (strlen($path_to_jsmath) == 0)
{
ilUtil::sendInfo($this->lng->txt("fill_out_all_required_fields"), TRUE);
}
else
{
$ilCtrl->setParameter($this, "path_to_jsmath", $path_to_jsmath);
ilUtil::sendInfo($this->lng->txt("jsmath_path_not_found"), TRUE);
}
}
if (!$error)
{
$jsMathSetting = new ilSetting("jsMath");
$jsMathSetting->set("path_to_jsmath", $path_to_jsmath);
$jsMathSetting->set("enable", ilUtil::stripSlashes($_POST["enable"]));
$jsMathSetting->set("makedefault", ilUtil::stripSlashes($_POST["makedefault"]));
}
$ilCtrl->redirect($this, "editjsMath");
}

+ Here is the call graph for this function:

ilObjExternalToolsSettingsGUI::viewObject ( )

display settings menu

public

Reimplemented from ilObjectGUI.

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

References __initSubTabs(), and ilObjectGUI\getTemplateFile().

{
global $rbacsystem;
if (!$rbacsystem->checkAccess("visible,read",$this->object->getRefId()))
{
$this->ilias->raiseError($this->lng->txt("permission_denied"),$this->ilias->error_obj->MESSAGE);
}
$this->__initSubTabs("view");
$this->getTemplateFile("general");
$this->tpl->setVariable("FORMACTION",
$this->ctrl->getFormAction($this));
$this->tpl->setVariable("TXT_EXTT_TITLE", $this->lng->txt("extt_title_configure"));
$this->tpl->setVariable("TXT_EXTT_NAME", $this->lng->txt("extt_name"));
$this->tpl->setVariable("TXT_EXTT_ACTIVE", $this->lng->txt("active")."?");
$this->tpl->setVariable("TXT_EXTT_DESC", $this->lng->txt("description"));
$this->tpl->setVariable("TXT_CONFIGURE", $this->lng->txt("extt_configure"));
$this->tpl->setVariable("TXT_EXTT_REMARK", $this->lng->txt("extt_remark"));
// ilinc
$this->tpl->setVariable("TXT_EXTT_ILINC_NAME", $this->lng->txt("extt_ilinc"));
$this->tpl->setVariable("TXT_EXTT_ILINC_DESC", $this->lng->txt("extt_ilinc_desc"));
// icon handlers
$icon_ok = "<img src=\"".ilUtil::getImagePath("icon_ok.gif")."\" alt=\"".$this->lng->txt("enabled")."\" title=\"".$this->lng->txt("enabled")."\" border=\"0\" vspace=\"0\"/>";
$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\"/>";
$this->tpl->setVariable("EXTT_ILINC_ACTIVE", $this->ilias->getSetting('ilinc_active') ? $icon_ok : $icon_not_ok);
}

+ Here is the call graph for this function:


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