5 require_once
"./Services/Object/classes/class.ilObjectGUI.php";
24 function __construct($a_data,$a_id,$a_call_by_reference,$a_prepare_output =
true)
29 parent::__construct($a_data,$a_id,$a_call_by_reference,
false);
31 $lng->loadLanguageModule(
"delic");
32 $lng->loadLanguageModule(
"maps");
33 $lng->loadLanguageModule(
"mathjax");
50 $this->ctrl->setParameter($this,
"ref_id",$this->
object->getRefId());
52 if ($rbacsystem->checkAccess(
"visible,read",$this->object->getRefId()))
54 $this->tabs_gui->addTarget(
"settings",
55 $this->ctrl->getLinkTarget($this,
"view"),
56 array(
"editMaps",
"editMathJax",
""),
"",
"");
57 $this->lng->loadLanguageModule(
'ecs');
60 if ($rbacsystem->checkAccess(
'edit_permission',$this->object->getRefId()))
62 $this->tabs_gui->addTarget(
"perm_settings",
63 $this->ctrl->getLinkTargetByClass(
array(get_class($this),
'ilpermissiongui'),
"perm"),
array(
"perm",
"info",
"owner"),
'ilpermissiongui');
79 include_once(
"./Services/Form/classes/class.ilPropertyFormGUI.php");
81 $form->setFormAction($ilCtrl->getFormAction($this));
82 $form->setTitle($lng->txt(
"mathjax_settings"));
87 $enable->setInfo($lng->txt(
"mathjax_enable_mathjax_info").
" <a target='blank' href='http://www.mathjax.org/'>" 88 .$lng->txt(
"mathjax_home_link").
"</a>");
89 $form->addItem($enable);
92 $text_prop =
new ilTextInputGUI($lng->txt(
"mathjax_path_to_mathjax"),
"path_to_mathjax");
93 $text_prop->
setInfo($lng->txt(
"mathjax_path_to_mathjax_desc"));
94 $text_prop->setValue($path_to_mathjax);
95 $text_prop->setRequired(
true);
96 $text_prop->setMaxLength(400);
97 $text_prop->setSize(100);
98 $enable->addSubItem($text_prop);
102 0 =>
'\​(...\​)',
103 1 =>
'[tex]...[/tex]',
104 2 =>
'<span class="math">...</span>' 109 $si->setInfo($this->lng->txt(
"mathjax_limiter_info"));
110 $enable->addSubItem(
$si);
112 include_once
'./Services/MathJax/classes/class.ilMathJax.php';
113 $install_link =
' <a target="_blank" href="Services/MathJax/docs/Install-MathJax-Server.txt">' 114 .$lng->txt(
"mathjax_server_installation").
'</a>';
115 $clear_cache_link =
' <a href="'.$this->ctrl->getLinkTarget($this,
'clearMathJaxCache').
'"">' 116 .$lng->txt(
"mathjax_server_clear_cache").
'</a>';
121 $server->setInfo($lng->txt(
"mathjax_enable_server_info").$install_link);
126 $text_prop =
new ilTextInputGUI($lng->txt(
"mathjax_server_address"),
"server_address");
127 $text_prop->
setInfo($lng->txt(
"mathjax_server_address_info"));
129 $text_prop->setRequired(
true);
130 $text_prop->setMaxLength(400);
131 $text_prop->setSize(100);
132 $server->addSubItem($text_prop);
135 $number_prop =
new ilNumberInputGUI($lng->txt(
"mathjax_server_timeout"),
"server_timeout");
136 $number_prop->
setInfo($lng->txt(
"mathjax_server_timeout_info"));
138 $number_prop->setRequired(
true);
139 $number_prop->setSize(3);
140 $server->addSubItem($number_prop);
143 $checkbox =
new ilCheckboxInputGUI($lng->txt(
"mathjax_server_for_browser"),
"server_for_browser");
144 $checkbox->
setInfo($lng->txt(
"mathjax_server_for_browser_info"));
145 $checkbox->setChecked((
bool)
$mathJaxSetting->get(
"server_for_browser"));
146 $server->addSubItem($checkbox);
149 $checkbox =
new ilCheckboxInputGUI($lng->txt(
"mathjax_server_for_export"),
"server_for_export");
150 $checkbox->
setInfo($lng->txt(
"mathjax_server_for_export_info"));
151 $checkbox->setChecked((
bool)
$mathJaxSetting->get(
"server_for_export"));
152 $server->addSubItem($checkbox);
155 $checkbox =
new ilCheckboxInputGUI($lng->txt(
"mathjax_server_for_pdf"),
"server_for_pdf");
156 $checkbox->
setInfo($lng->txt(
"mathjax_server_for_pdf_info"));
158 $server->addSubItem($checkbox);
162 $size->setInfo($lng->txt(
"mathjax_server_cache_size_info") . $clear_cache_link);
168 include_once
'./Services/MathJax/classes/class.ilMathJax.php';
171 $test->setInfo($lng->txt(
'mathjax_test_expression_info'));
172 $form->addItem(
$test);
174 if ($ilAccess->checkAccess(
"write",
"", $this->object->getRefId()))
176 $form->addCommandButton(
"saveMathJax", $lng->txt(
"save"));
179 $tpl->setVariable(
"ADM_CONTENT", $form->getHTML());
189 if ($ilAccess->checkAccess(
"write",
"", $this->object->getRefId()))
202 if (
$_POST[
"enable_server"])
214 $ilCtrl->redirect($this,
"editMathJax");
224 include_once
'./Services/MathJax/classes/class.ilMathJax.php';
228 $this->ctrl->redirect($this,
'editMathJax');
238 require_once(
"Services/Maps/classes/class.ilMapUtil.php");
248 include_once(
"./Services/Form/classes/class.ilPropertyFormGUI.php");
249 include_once(
"./Services/Form/classes/class.ilCheckboxOption.php");
251 $form->setFormAction($ilCtrl->getFormAction($this));
252 $form->setTitle($lng->txt(
"maps_settings"));
257 $enable->setInfo($lng->txt(
"maps_enable_maps_info"));
258 $form->addItem($enable);
263 $types->setValue($type);
264 $form->addItem($types);
267 if($type ==
"openlayers") {
271 $geolocation =
new ilTextInputGUI($lng->txt(
"maps_geolocation_server"),
"geolocation");
273 $geolocation->setInfo($lng->txt(
"maps_custom_geolocation_server_info"));
275 $form->addItem($tile);
276 $form->addItem($geolocation);
280 $key->setMaxLength(200);
282 $form->addItem($key);
290 $loc_prop->setLongitude($std_longitude);
291 $loc_prop->setZoom($std_zoom);
292 $form->addItem($loc_prop);
294 if ($ilAccess->checkAccess(
"write",
"", $this->object->getRefId()))
296 $form->addCommandButton(
"saveMaps", $lng->txt(
"save"));
297 $form->addCommandButton(
"view", $lng->txt(
"cancel"));
300 $tpl->setVariable(
"ADM_CONTENT", $form->getHTML());
309 require_once(
"Services/Maps/classes/class.ilMapUtil.php");
324 $ilCtrl->redirect($this,
"editMaps");
330 $maps = ($a_cmd ==
'editMaps') ?
true :
false;
331 $mathjax = ($a_cmd ==
'editMathJax') ?
true :
false;
333 $this->tabs_gui->addSubTabTarget(
"maps_extt_maps", $this->ctrl->getLinkTarget($this,
"editMaps"),
335 $this->tabs_gui->addSubTabTarget(
"mathjax_mathjax", $this->ctrl->getLinkTarget($this,
"editMathJax"),
336 "",
"",
"", $mathjax);
343 $next_class = $this->ctrl->getNextClass($this);
344 $cmd = $this->ctrl->getCmd();
347 if (!$ilAccess->checkAccess(
"read",
"", $this->object->getRefId()))
349 $this->
ilias->raiseError($this->lng->txt(
"permission_denied"),$this->
ilias->error_obj->MESSAGE);
354 case 'ilecssettingsgui':
355 $this->tabs_gui->setTabActive(
'ecs_server_settings');
356 include_once(
'./Services/WebServices/ECS/classes/class.ilECSSettingsGUI.php');
360 case 'ilpermissiongui':
361 include_once(
"Services/AccessControl/classes/class.ilPermissionGUI.php");
363 $ret =& $this->ctrl->forwardCommand($perm_gui);
364 $this->tabs_gui->setTabActive(
'perm_settings');
368 $this->tabs_gui->setTabActive(
'settings');
static sendSuccess($a_info="", $a_keep=false)
Send Success Message to Screen.
static setStdZoom($a_zoom)
static setStdGeolocationServer($a_geolocation)
static setStdLongitude($a_lon)
static setStdTileServers($a_tile)
static sendInfo($a_info="", $a_keep=false)
Send Info Message to Screen.
static setApiKey($a_api_key)
prepareOutput($a_show_subobjects=true)
prepare output
if(!is_array($argv)) $options
static setActivated($a_activated)
Class ilObjectGUI Basic methods of all Output classes.
This class represents a text property in a property form.
redirection script todo: (a better solution should control the processing via a xml file) ...
static setStdLatitude($a_lat)
if(strpos($jquery_path, './')===0) else if(strpos($jquery_path, '.')===0) $mathJaxSetting
static stripSlashes($a_str, $a_strip_html=true, $a_allow="")
strip slashes if magic qoutes is enabled
static getAvailableMapTypes()
Get a dict { $id => $name } for available maps services.
Create styles array
The data for the language used.
static isActivated()
Checks whether Map feature is activated.
static getStdGeolocationServer()
Returns the reverse geolocation server to be used in the installation.
This class represents a non editable value in a property form.
static getInstance()
Singleton: get instance.
Create new PHPExcel object
obj_idprivate
New PermissionGUI (extends from old ilPermission2GUI) RBAC related output.
static getStdTileServers()
Returns the tile server to be used in the installation.
setValue($a_value)
Set Value.