5require_once
"./Services/Object/classes/class.ilObjectGUI.php";
39 public function __construct($a_data, $a_id, $a_call_by_reference, $a_prepare_output =
true)
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"];
54 $lng->loadLanguageModule(
"delic");
55 $lng->loadLanguageModule(
"maps");
56 $lng->loadLanguageModule(
"mathjax");
73 $this->ctrl->setParameter($this,
"ref_id", $this->object->getRefId());
75 if (
$rbacsystem->checkAccess(
"visible,read", $this->object->getRefId())) {
76 $this->tabs_gui->addTarget(
78 $this->ctrl->getLinkTarget($this,
"view"),
79 array(
"editMaps",
"editMathJax",
""),
83 $this->lng->loadLanguageModule(
'ecs');
86 if (
$rbacsystem->checkAccess(
'edit_permission', $this->object->getRefId())) {
87 $this->tabs_gui->addTarget(
89 $this->ctrl->getLinkTargetByClass(array(get_class($this),
'ilpermissiongui'),
"perm"),
90 array(
"perm",
"info",
"owner"),
112 include_once(
"./Services/Form/classes/class.ilPropertyFormGUI.php");
114 $form->setFormAction($ilCtrl->getFormAction($this));
115 $form->setTitle(
$lng->txt(
"mathjax_settings"));
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);
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);
135 0 =>
'\​(...\​)',
136 1 =>
'[tex]...[/tex]',
137 2 =>
'<span class="math">...</span>'
140 $si->setOptions($options);
142 $si->setInfo($this->lng->txt(
"mathjax_limiter_info"));
143 $enable->addSubItem(
$si);
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>';
154 $server->setInfo(
$lng->txt(
"mathjax_enable_server_info") . $install_link);
159 $text_prop =
new ilTextInputGUI(
$lng->txt(
"mathjax_server_address"),
"server_address");
160 $text_prop->setInfo(
$lng->txt(
"mathjax_server_address_info"));
162 $text_prop->setRequired(
true);
163 $text_prop->setMaxLength(400);
164 $text_prop->setSize(100);
165 $server->addSubItem($text_prop);
169 $number_prop->setInfo(
$lng->txt(
"mathjax_server_timeout_info"));
171 $number_prop->setRequired(
true);
172 $number_prop->setSize(3);
173 $server->addSubItem($number_prop);
177 $checkbox->setInfo(
$lng->txt(
"mathjax_server_for_browser_info"));
178 $checkbox->setChecked((
bool)
$mathJaxSetting->get(
"server_for_browser"));
179 $server->addSubItem($checkbox);
183 $checkbox->setInfo(
$lng->txt(
"mathjax_server_for_export_info"));
184 $checkbox->setChecked((
bool)
$mathJaxSetting->get(
"server_for_export"));
185 $server->addSubItem($checkbox);
189 $checkbox->setInfo(
$lng->txt(
"mathjax_server_for_pdf_info"));
191 $server->addSubItem($checkbox);
195 $size->setInfo(
$lng->txt(
"mathjax_server_cache_size_info") . $clear_cache_link);
201 include_once
'./Services/MathJax/classes/class.ilMathJax.php';
203 $test->setHtml($html);
204 $test->setInfo(
$lng->txt(
'mathjax_test_expression_info'));
205 $form->addItem(
$test);
207 if ($ilAccess->checkAccess(
"write",
"", $this->object->getRefId())) {
208 $form->addCommandButton(
"saveMathJax",
$lng->txt(
"save"));
211 $tpl->setVariable(
"ADM_CONTENT", $form->getHTML());
223 if ($ilAccess->checkAccess(
"write",
"", $this->object->getRefId())) {
234 if (
$_POST[
"enable_server"]) {
245 $ilCtrl->redirect($this,
"editMathJax");
255 include_once
'./Services/MathJax/classes/class.ilMathJax.php';
258 ilUtil::sendSuccess(
$lng->txt(
'mathjax_server_cache_cleared'),
true);
259 $this->ctrl->redirect($this,
'editMathJax');
269 require_once(
"Services/Maps/classes/class.ilMapUtil.php");
282 include_once(
"./Services/Form/classes/class.ilPropertyFormGUI.php");
283 include_once(
"./Services/Form/classes/class.ilCheckboxOption.php");
285 $form->setFormAction($ilCtrl->getFormAction($this));
286 $form->setTitle(
$lng->txt(
"maps_settings"));
291 $enable->setInfo(
$lng->txt(
"maps_enable_maps_info"));
292 $form->addItem($enable);
297 $types->setValue(
$type);
298 $form->addItem($types);
301 if (
$type ==
"openlayers") {
305 $geolocation =
new ilTextInputGUI(
$lng->txt(
"maps_geolocation_server"),
"geolocation");
307 $geolocation->setInfo(
$lng->txt(
"maps_custom_geolocation_server_info"));
309 $form->addItem($tile);
310 $form->addItem($geolocation);
314 $key->setMaxLength(200);
316 $form->addItem($key);
321 $lng->txt(
"maps_std_location"),
325 $loc_prop->setLatitude($std_latitude);
326 $loc_prop->setLongitude($std_longitude);
327 $loc_prop->setZoom($std_zoom);
328 $form->addItem($loc_prop);
330 if ($ilAccess->checkAccess(
"write",
"", $this->object->getRefId())) {
331 $form->addCommandButton(
"saveMaps",
$lng->txt(
"save"));
332 $form->addCommandButton(
"view",
$lng->txt(
"cancel"));
335 $tpl->setVariable(
"ADM_CONTENT", $form->getHTML());
344 require_once(
"Services/Maps/classes/class.ilMapUtil.php");
359 $ilCtrl->redirect($this,
"editMaps");
365 $maps = ($a_cmd ==
'editMaps') ?
true :
false;
366 $mathjax = ($a_cmd ==
'editMathJax') ?
true :
false;
368 $this->tabs_gui->addSubTabTarget(
370 $this->ctrl->getLinkTarget($this,
"editMaps"),
376 $this->tabs_gui->addSubTabTarget(
378 $this->ctrl->getLinkTarget($this,
"editMathJax"),
390 $next_class = $this->ctrl->getNextClass($this);
391 $cmd = $this->ctrl->getCmd();
394 if (!$this->rbacsystem->checkAccess(
"visible,read", $this->object->getRefId())) {
395 $this->
ilias->raiseError($this->lng->txt(
"permission_denied"), $this->ilias->error_obj->MESSAGE);
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');
405 case 'ilpermissiongui':
406 include_once(
"Services/AccessControl/classes/class.ilPermissionGUI.php");
408 $ret = &$this->ctrl->forwardCommand($perm_gui);
409 $this->tabs_gui->setTabActive(
'perm_settings');
413 $this->tabs_gui->setTabActive(
'settings');
414 if (!$cmd || $cmd ==
'view') {
An exception for terminatinating execution or to throw for unit testing.
static getStdGeolocationServer()
Returns the reverse geolocation server to be used in the installation.
static getStdTileServers()
Returns the tile server to be used in the installation.
static setApiKey($a_api_key)
static setActivated($a_activated)
static setStdLatitude($a_lat)
static isActivated()
Checks whether Map feature is activated.
static setStdZoom($a_zoom)
static setStdGeolocationServer($a_geolocation)
static setStdLongitude($a_lon)
static getAvailableMapTypes()
Get a dict { $id => $name } for available maps services.
static setStdTileServers($a_tile)
static getInstance()
Singleton: get instance.
This class represents a non editable value in a property form.
Class ilObjectGUI Basic methods of all Output classes.
prepareOutput($a_show_subobjects=true)
prepare output
New PermissionGUI (extends from old ilPermission2GUI) RBAC related output.
This class represents a text property in a property form.
static stripSlashes($a_str, $a_strip_html=true, $a_allow="")
strip slashes if magic qoutes is enabled
static sendInfo($a_info="", $a_keep=false)
Send Info Message to Screen.
if(strpos( $jquery_path, './')===0) elseif(strpos($jquery_path, '.')===0) $mathJaxSetting
__construct(Container $dic, ilPlugin $plugin)
@inheritDoc
redirection script todo: (a better solution should control the processing via a xml file)