5 include_once
"./Services/Object/classes/class.ilObjectGUI.php";
29 parent::__construct($a_data,$a_id,$a_call_by_reference,
false);
30 $this->lng->loadLanguageModule(
'adve');
31 $this->lng->loadLanguageModule(
'meta');
33 if (!$rbacsystem->checkAccess(
'read',$this->object->getRefId()))
35 $this->
ilias->raiseError($this->lng->txt(
"msg_no_perm_read_adve"),$this->
ilias->error_obj->WARNING);
41 $next_class = $this->ctrl->getNextClass($this);
42 $cmd = $this->ctrl->getCmd();
48 case 'ilpermissiongui':
49 include_once(
"Services/AccessControl/classes/class.ilPermissionGUI.php");
51 $ret =& $this->ctrl->forwardCommand($perm_gui);
57 $cmd =
"showGeneralPageEditorSettings";
76 $newObj = parent::saveObject();
83 $this->ctrl->redirect($this);
100 if ($ilCtrl->getNextClass() !=
"ilpermissiongui" &&
101 !in_array($ilCtrl->getCmd(),
array(
"showPageEditorSettings",
102 "showGeneralPageEditorSettings",
"showCharSelectorSettings",
"",
"view")))
104 $this->tabs_gui->addSubTabTarget(
"adve_general_settings",
105 $this->ctrl->getLinkTarget($this,
"settings"),
106 array(
"settings",
"saveSettings"),
108 $this->tabs_gui->addSubTabTarget(
"adve_assessment_settings",
109 $this->ctrl->getLinkTarget($this,
"assessment"),
110 array(
"assessment",
"saveAssessmentSettings"),
112 $this->tabs_gui->addSubTabTarget(
"adve_survey_settings",
113 $this->ctrl->getLinkTarget($this,
"survey"),
114 array(
"survey",
"saveSurveySettings"),
116 $this->tabs_gui->addSubTabTarget(
"adve_frm_post_settings",
117 $this->ctrl->getLinkTarget($this,
"frmPost"),
118 array(
"frmPost",
"saveFrmPostSettings"),
120 $this->tabs_gui->addSubTabTarget(
"adve_excass_settings",
121 $this->ctrl->getLinkTarget($this,
"excass"),
122 array(
"excass",
"saveExcAssSettings"),
134 $ilTabs->addSubTabTarget(
"adve_pe_general",
135 $ilCtrl->getLinkTarget($this,
"showGeneralPageEditorSettings"),
136 array(
"showGeneralPageEditorSettings",
"",
"view"));
138 include_once(
"./Services/COPage/classes/class.ilPageEditorSettings.php");
141 foreach ($grps as $g => $types)
143 $ilCtrl->setParameter($this,
"grp", $g);
144 $ilTabs->addSubTabTarget(
"adve_grp_".$g,
145 $ilCtrl->getLinkTarget($this,
"showPageEditorSettings"),
146 array(
"showPageEditorSettings"));
148 $ilCtrl->setParameter($this,
"grp",
$_GET[
"grp"]);
160 if ($rbacsystem->checkAccess(
"visible,read",$this->object->getRefId()))
162 $this->tabs_gui->addTarget(
"adve_page_editor_settings",
163 $this->ctrl->getLinkTarget($this,
"showGeneralPageEditorSettings"),
164 array(
"showPageEditorSettings",
"",
"view"));
166 $this->tabs_gui->addTarget(
"adve_rte_settings",
167 $this->ctrl->getLinkTarget($this,
"settings"),
168 array(
"settings",
"assessment",
"survey",
"frmPost",
"excass"),
"",
"");
170 $this->tabs_gui->addTarget(
"adve_char_selector_settings",
171 $this->ctrl->getLinkTarget($this,
"showCharSelectorSettings"),
172 array(
"showCharSelectorSettings",
"",
"view"));
175 if ($rbacsystem->checkAccess(
'edit_permission',$this->object->getRefId()))
177 $this->tabs_gui->addTarget(
"perm_settings",
178 $this->ctrl->getLinkTargetByClass(
array(get_class($this),
'ilpermissiongui'),
"perm"),
array(
"perm",
"info",
"owner"),
'ilpermissiongui');
191 $editor = $this->
object->_getRichTextEditor();
193 include_once(
"Services/Form/classes/class.ilPropertyFormGUI.php");
195 $this->form->setFormAction($ilCtrl->getFormAction($this));
196 $this->form->setTitle($lng->txt(
"adve_activation"));
198 if ($editor ==
"tinymce")
202 $this->form->addItem($cb);
203 $this->form->addCommandButton(
"saveSettings", $lng->txt(
"save"));
205 $tpl->setContent($this->form->getHTML());
215 $this->
object->setRichTextEditor(
"tinymce");
219 $this->
object->setRichTextEditor(
"");
223 $this->ctrl->redirect($this,
'settings');
232 $form = $this->
initTagsForm(
"assessment",
"saveAssessmentSettings",
233 "advanced_editing_assessment_settings");
235 $this->tpl->setContent($form->getHTML());
240 $this->
saveTags(
"assessment",
"assessment");
249 $form = $this->
initTagsForm(
"survey",
"saveSurveySettings",
250 "advanced_editing_survey_settings");
252 $this->tpl->setContent($form->getHTML());
257 $this->
saveTags(
"survey",
"survey");
266 $form = $this->
initTagsForm(
"frm_post",
"saveFrmPostSettings",
267 "advanced_editing_frm_post_settings");
269 $this->tpl->setContent($form->getHTML());
274 $this->
saveTags(
"frm_post",
"frmPost");
283 $form = $this->
initTagsForm(
"exc_ass",
"saveExcAssSettings",
284 "advanced_editing_excass_settings");
286 $this->tpl->setContent($form->getHTML());
291 $this->
saveTags(
"exc_ass",
"excAss");
299 include_once
"Services/Form/classes/class.ilPropertyFormGUI.php";
301 $form->setFormAction($this->ctrl->getFormAction($this, $a_cmd));
302 $form->setTitle($this->lng->txt($a_title));
304 $alltags = $this->
object->getHTMLTags();
305 $alltags = array_combine($alltags, $alltags);
307 include_once
"Services/Form/classes/class.ilMultiSelectInputGUI.php";
310 $tags->enableSelectAll(
true);
311 $tags->enableSelectedFirst(
true);
312 $tags->setOptions($alltags);
314 $form->addItem($tags);
316 if ($ilAccess->checkAccess(
"write",
"", $this->object->getRefId()))
318 $form->addCommandButton($a_cmd, $this->lng->txt(
"save"));
329 if(is_array(
$_POST[
'html_tags']) &&
$_POST[
'html_tags'][0] ==
"")
331 unset(
$_POST[
'html_tags'][0]);
334 $this->
object->setUsedHTMLTags((
array)
$_POST[
'html_tags'], $a_id);
342 $this->ctrl->redirect($this, $a_cmd);
353 $this->addPageEditorSettingsSubTabs();
355 include_once(
"./Services/COPage/classes/class.ilPageEditorSettings.php");
358 $this->cgrp =
$_GET[
"grp"];
359 if ($this->cgrp ==
"")
361 $this->cgrp = key($grps);
364 $ilCtrl->setParameter($this,
"grp", $this->cgrp);
365 $ilTabs->setSubTabActive(
"adve_grp_".$this->cgrp);
368 $tpl->setContent($this->form->getHtml());
380 $lng->loadLanguageModule(
"content");
382 include_once(
"Services/Form/classes/class.ilPropertyFormGUI.php");
385 if( $this->cgrp ==
"test" )
387 require_once
'Modules/Test/classes/class.ilObjAssessmentFolder.php';
389 $this->form->setTitle($lng->txt(
"adve_activation"));
390 $cb =
new ilCheckboxInputGUI($this->lng->txt(
"advanced_editing_tst_editing"),
"tst_page_edit");
391 $cb->
setInfo($this->lng->txt(
"advanced_editing_tst_editing_desc"));
394 $cb->setChecked(
true);
396 $this->form->addItem($cb);
399 $sh->setTitle($lng->txt(
"adve_text_content_features"));
400 $this->form->addItem($sh);
402 elseif ($this->cgrp ==
"rep")
404 $this->form->setTitle($lng->txt(
"adve_activation"));
405 $cb =
new ilCheckboxInputGUI($this->lng->txt(
"advanced_editing_rep_page_editing"),
"cat_page_edit");
406 $cb->
setInfo($this->lng->txt(
"advanced_editing_rep_page_editing_desc"));
407 if ($ilSetting->get(
"enable_cat_page_edit"))
409 $cb->setChecked(
true);
411 $this->form->addItem($cb);
414 $sh->setTitle($lng->txt(
"adve_text_content_features"));
415 $this->form->addItem($sh);
419 $this->form->setTitle($lng->txt(
"adve_text_content_features"));
423 include_once(
"./Services/COPage/classes/class.ilPageEditorSettings.php");
425 include_once(
"./Services/COPage/classes/class.ilPageContentGUI.php");
427 foreach ($buttons as $b =>
$t)
430 $cb =
new ilCheckboxInputGUI(str_replace(
":",
"", $this->lng->txt(
"cont_text_".$b)),
"active_".$b);
432 $this->form->addItem($cb);
436 $this->form->addCommandButton(
"savePageEditorSettings", $lng->txt(
"save"));
438 $this->form->setFormAction($this->ctrl->getFormAction($this));
451 if ($this->form->checkInput())
453 include_once(
"./Services/COPage/classes/class.ilPageEditorSettings.php");
454 include_once(
"./Services/COPage/classes/class.ilPageContentGUI.php");
456 foreach ($buttons as $b =>
$t)
459 $this->form->getInput(
"active_".$b));
462 if (
$_GET[
"grp"] ==
"test")
464 $ilSetting->set(
"enable_tst_page_edit", (
int)
$_POST[
"tst_page_edit"]);
466 elseif (
$_GET[
"grp"] ==
"rep")
468 $ilSetting->set(
"enable_cat_page_edit", (
int)
$_POST[
"cat_page_edit"]);
474 $ilCtrl->setParameter($this,
"grp",
$_GET[
"grp"]);
475 $ilCtrl->redirect($this,
"showPageEditorSettings");
484 global
$tpl, $ilTabs;
486 $this->addPageEditorSettingsSubTabs();
487 $ilTabs->activateTab(
"adve_page_editor_settings");
490 $tpl->setContent($form->getHTML());
500 include_once(
"Services/Form/classes/class.ilPropertyFormGUI.php");
507 $cb->
setInfo($this->lng->txt(
"adve_use_physical_info"));
508 $cb->setChecked($aset->get(
"use_physical"));
512 $cb =
new ilCheckboxInputGUI($this->lng->txt(
"adve_blocking_mode"),
"block_mode_act");
513 $cb->
setChecked($aset->get(
"block_mode_minutes") > 0);
517 $ni =
new ilNumberInputGUI($this->lng->txt(
"adve_minutes"),
"block_mode_minutes");
519 $ni->setMaxLength(5);
521 $ni->setRequired(
true);
522 $ni->setInfo($this->lng->txt(
"adve_minutes_info"));
523 $ni->setValue($aset->get(
"block_mode_minutes"));
524 $cb->addSubItem($ni);
527 $cb =
new ilCheckboxInputGUI($this->lng->txt(
"adve_auto_url_linking"),
"auto_url_linking");
528 $cb->
setChecked($aset->get(
"auto_url_linking"));
529 $cb->setInfo($this->lng->txt(
"adve_auto_url_linking_info"));
532 $form->addCommandButton(
"saveGeneralPageSettings", $lng->txt(
"save"));
534 $form->setTitle($lng->txt(
"adve_pe_general"));
535 $form->setFormAction($ilCtrl->getFormAction($this));
548 if ($form->checkInput())
551 $aset->set(
"use_physical",
$_POST[
"use_physical"]);
552 if (
$_POST[
"block_mode_act"])
554 $aset->set(
"block_mode_minutes", (
int)
$_POST[
"block_mode_minutes"]);
558 $aset->set(
"block_mode_minutes", 0);
560 $aset->set(
"auto_url_linking",
$_POST[
"auto_url_linking"]);
563 $ilCtrl->redirect($this,
"showGeneralPageEditorSettings");
566 $form->setValuesByPost();
567 $tpl->setContent($form->getHTML());
577 include_once(
"Services/Form/classes/class.ilPropertyFormGUI.php");
579 $form->setTitle($lng->txt(
'settings'));
580 $form->setFormAction($ilCtrl->getFormAction($this));
581 $form->addCommandButton(
"saveCharSelectorSettings", $lng->txt(
"save"));
595 $ilTabs->activateTab(
"adve_char_selector_settings");
597 require_once
'Services/UIComponent/CharSelector/classes/class.ilCharSelectorGUI.php';
599 $char_selector->getConfig()->setAvailability($ilSetting->get(
'char_selector_availability'));
600 $char_selector->getConfig()->setDefinition($ilSetting->get(
'char_selector_definition'));
602 $char_selector->setFormValues($form);
603 $tpl->setContent($form->getHTML());
614 require_once
'Services/UIComponent/CharSelector/classes/class.ilCharSelectorGUI.php';
617 if ($form->checkInput())
619 $char_selector->getFormValues($form);
621 $ilSetting->set(
'char_selector_availability', $char_selector->getConfig()->getAvailability());
622 $ilSetting->set(
'char_selector_definition', $char_selector->getConfig()->getDefinition());
625 $ilCtrl->redirect($this,
"showCharSelectorSettings");
627 $form->setValuesByPost();
628 $tpl->setContent($form->getHTML());
saveExcAssSettingsObject()
static sendSuccess($a_info="", $a_keep=false)
Send Success Message to Screen.
frmPostObject()
Display settings for forums.
surveyObject()
Display settings for surveys.
excAssObject()
Display settings for exercise assignments.
This shows a character selector.
addSubtabs()
Add rte subtabs.
static lookupSetting($a_grp, $a_name, $a_default=false)
Lookup setting.
static _getUsedHTMLTags($a_module="")
Returns an array of all allowed HTML tags for text editing.
addPageEditorSettingsSubtabs()
Show page editor settings subtabs.
saveCharSelectorSettingsObject()
Save the settings for the selector of unicode characters.
showGeneralPageEditorSettingsObject()
Show general page editor settings.
assessmentObject()
Display settings for test and assessment.
saveGeneralPageSettingsObject()
Save general page settings.
static getGroups()
Get all settings groups.
settingsObject()
Display assessment folder settings form.
__construct($a_data, $a_id, $a_call_by_reference)
Constructor.
initTagsForm($a_id, $a_cmd, $a_title)
static sendInfo($a_info="", $a_keep=false)
Send Info Message to Screen.
static writeSetting($a_grp, $a_name, $a_value)
Write Setting.
initPageEditorForm($a_mode="edit")
Init page editor form.
saveSettingsObject()
Save Assessment settings.
prepareOutput($a_show_subobjects=true)
prepare output
showPageEditorSettingsObject()
Show page editor settings.
saveFrmPostSettingsObject()
saveObject()
save object public
addFormProperties(ilPropertyFormGUI $a_form)
add the configuration elements to a property form
const ADDITIONAL_QUESTION_CONTENT_EDITING_MODE_PAGE_OBJECT_DISABLED
saveAssessmentSettingsObject()
Class ilObjectGUI Basic methods of all Output classes.
showCharSelectorSettingsObject()
Show the settings for the selector of unicode characters.
redirection script todo: (a better solution should control the processing via a xml file) ...
Create styles array
The data for the language used.
initCharSelectorSettingsForm(ilCharSelectorGUI $char_selector)
Init the settings form for the selector of unicode characters.
static _getCommonBBButtons()
Get common bb buttons.
savePageEditorSettingsObject()
Save page editor settings form.
Class ilObjAdvancedEditingGUI.
New PermissionGUI (extends from old ilPermission2GUI) RBAC related output.
initGeneralPageSettingsForm()
Init general page editor settings form.
saveSurveySettingsObject()