34 bool $a_call_by_reference
39 $this->component_repository = $DIC[
"component.repository"];
43 $this->
lng->loadLanguageModule(
'adve');
44 $this->
lng->loadLanguageModule(
'meta');
53 if (!$this->rbac_system->checkAccess(
'read', $this->object->getRefId())) {
54 $mess = str_replace(
"%s", $this->
object->getTitle(), $this->
lng->txt(
"msg_no_perm_read_item"));
55 $this->
ilias->raiseError($mess, $this->
ilias->error_obj->WARNING);
58 $next_class = $this->
ctrl->getNextClass($this);
59 $cmd = $this->
ctrl->getCmd();
62 switch ($next_class) {
64 case 'ilpermissiongui':
66 $this->
ctrl->forwardCommand($perm_gui);
70 if ($cmd === null || $cmd ===
"" || $cmd ===
"view") {
71 $cmd =
"showGeneralPageEditorSettings";
87 $this->tpl->setOnScreenMessage(
'success', $this->
lng->txt(
"object_added"),
true);
88 $this->
ctrl->redirect($this);
98 if ($this->
ctrl->getNextClass() !==
"ilpermissiongui" &&
99 !in_array($this->
ctrl->getCmd(), array(
100 "showPageEditorSettings",
101 "showGeneralPageEditorSettings",
102 "showCharSelectorSettings",
106 $this->tabs_gui->addSubTabTarget(
107 "adve_general_settings",
108 $this->
ctrl->getLinkTarget($this,
"settings"),
109 array(
"settings",
"saveSettings"),
113 $this->tabs_gui->addSubTabTarget(
114 "adve_assessment_settings",
115 $this->
ctrl->getLinkTarget($this,
"assessment"),
116 array(
"assessment",
"saveAssessmentSettings"),
120 $this->tabs_gui->addSubTabTarget(
121 "adve_survey_settings",
122 $this->
ctrl->getLinkTarget($this,
"survey"),
123 array(
"survey",
"saveSurveySettings"),
127 $this->tabs_gui->addSubTabTarget(
128 "adve_frm_post_settings",
129 $this->
ctrl->getLinkTarget($this,
"frmPost"),
130 array(
"frmPost",
"saveFrmPostSettings"),
134 $this->tabs_gui->addSubTabTarget(
135 "adve_excass_settings",
136 $this->
ctrl->getLinkTarget($this,
"excass"),
137 array(
"excass",
"saveExcAssSettings"),
146 $this->tabs_gui->addSubTabTarget(
148 $this->
ctrl->getLinkTarget($this,
"showGeneralPageEditorSettings"),
149 array(
"showGeneralPageEditorSettings",
"",
"view")
154 foreach ($grps as $g => $types) {
155 $this->
ctrl->setParameter($this,
"grp", $g);
156 $this->tabs_gui->addSubTabTarget(
158 $this->
ctrl->getLinkTarget($this,
"showPageEditorSettings"),
159 array(
"showPageEditorSettings")
162 $this->
ctrl->setParameter($this,
"grp", $this->std_request->getGroup());
167 if ($this->rbac_system->checkAccess(
"visible,read", $this->object->getRefId())) {
168 $this->tabs_gui->addTarget(
169 "adve_page_editor_settings",
170 $this->
ctrl->getLinkTarget($this,
"showGeneralPageEditorSettings"),
171 array(
"showPageEditorSettings",
"",
"view")
174 $this->tabs_gui->addTarget(
176 $this->
ctrl->getLinkTarget($this,
"settings"),
177 array(
"settings",
"assessment",
"survey",
"frmPost",
"excass"),
182 $this->tabs_gui->addTarget(
183 "adve_char_selector_settings",
184 $this->
ctrl->getLinkTarget($this,
"showCharSelectorSettings"),
185 array(
"showCharSelectorSettings",
"",
"view")
189 if ($this->rbac_system->checkAccess(
'edit_permission', $this->object->getRefId())) {
190 $this->tabs_gui->addTarget(
192 $this->
ctrl->getLinkTargetByClass(array(get_class($this),
'ilpermissiongui'),
"perm"),
193 array(
"perm",
"info",
"owner"),
212 $form->
setTitle($this->
lng->txt(
"adve_activation"));
214 if ($editor ===
"tinymce") {
233 $this->
object->setRichTextEditor(
"tinymce");
235 $this->
object->setRichTextEditor(
"");
237 $this->tpl->setOnScreenMessage(
'success', $this->
lng->txt(
"msg_obj_modified"),
true);
239 $this->
ctrl->redirect($this,
'settings');
246 "saveAssessmentSettings",
247 "advanced_editing_assessment_settings" 250 $this->tpl->setContent($form->
getHTML());
257 "saveAssessmentSettings",
258 "advanced_editing_assessment_settings" 260 if (!$this->
saveTags(
"assessment",
"assessment", $form)) {
262 $this->tpl->setContent($form->
getHTML());
270 "saveSurveySettings",
271 "advanced_editing_survey_settings" 274 $this->tpl->setContent($form->
getHTML());
281 "saveSurveySettings",
282 "advanced_editing_survey_settings" 284 if (!$this->
saveTags(
"survey",
"survey", $form)) {
286 $this->tpl->setContent($form->
getHTML());
294 "saveFrmPostSettings",
295 "advanced_editing_frm_post_settings" 298 $this->tpl->setContent($form->
getHTML());
305 "saveFrmPostSettings",
306 "advanced_editing_frm_post_settings" 308 if (!$this->
saveTags(
"frm_post",
"frmPost", $form)) {
310 $this->tpl->setContent($form->
getHTML());
318 "saveExcAssSettings",
319 "advanced_editing_excass_settings" 322 $this->tpl->setContent($form->
getHTML());
329 "saveExcAssSettings",
330 "advanced_editing_excass_settings" 332 if (!$this->
saveTags(
"exc_ass",
"excAss", $form)) {
334 $this->tpl->setContent($form->
getHTML());
348 $alltags = $this->
object->getHTMLTags();
349 $alltags = array_combine($alltags, $alltags);
353 $tags->enableSelectAll(
true);
354 $tags->enableSelectedFirst(
true);
355 $tags->setOptions($alltags);
359 if ($this->
access->checkAccess(
"write",
"", $this->object->getRefId())) {
374 $html_tags = $form->
getInput(
"html_tags");
376 if (array_key_exists(0, $html_tags) && (
string) $html_tags[0] ===
'') {
377 unset($html_tags[0]);
379 $this->
object->setUsedHTMLTags((array) $html_tags, $a_id);
380 $this->tpl->setOnScreenMessage(
'success', $this->
lng->txt(
'msg_obj_modified'),
true);
385 $this->tpl->setOnScreenMessage(
'info', $e->getMessage(),
true);
387 $this->
ctrl->redirect($this, $a_cmd);
397 $this->cgrp = $this->std_request->getGroup();
398 if ($this->cgrp ===
"") {
399 $this->cgrp = (string) key($grps);
402 $this->
ctrl->setParameter($this,
"grp", $this->cgrp);
403 $this->tabs_gui->setSubTabActive(
"adve_grp_" . $this->cgrp);
406 $this->tpl->setContent($this->
form->getHTML());
411 $this->
lng->loadLanguageModule(
"content");
415 if ($this->cgrp ===
"test") {
416 $this->
form->setTitle($this->
lng->txt(
"adve_activation"));
418 $cb->
setInfo($this->
lng->txt(
"advanced_editing_tst_editing_desc"));
420 $cb->setChecked(
true);
422 $this->
form->addItem($cb);
425 $sh->setTitle($this->
lng->txt(
"adve_text_content_features"));
426 $this->
form->addItem($sh);
427 } elseif ($this->cgrp ===
"rep") {
428 $this->
form->setTitle($this->
lng->txt(
"adve_activation"));
430 $cb->
setInfo($this->
lng->txt(
"advanced_editing_rep_page_editing_desc"));
431 if ($this->
settings->get(
"enable_cat_page_edit")) {
432 $cb->setChecked(
true);
434 $this->
form->addItem($cb);
437 $sh->setTitle($this->
lng->txt(
"adve_text_content_features"));
438 $this->
form->addItem($sh);
440 $this->
form->setTitle($this->
lng->txt(
"adve_text_content_features"));
445 foreach ($buttons as
$b => $t) {
449 $this->
form->addItem($cb);
454 $this->
form->addCommandButton(
"savePageEditorSettings", $this->
lng->txt(
"save"));
457 $this->
form->setFormAction($this->
ctrl->getFormAction($this));
469 if ($this->
form->checkInput()) {
471 foreach ($buttons as
$b => $t) {
473 $this->std_request->getGroup(),
475 $this->
form->getInput(
"active_" .
$b)
479 if ($this->std_request->getGroup() ===
"test") {
480 $ilSetting->set(
"enable_tst_page_edit", (
string) $this->
form->getInput(
"tst_page_edit"));
481 } elseif ($this->std_request->getGroup() ===
"rep") {
482 $ilSetting->set(
"enable_cat_page_edit", (
string) $this->
form->getInput(
"cat_page_edit"));
485 $this->tpl->setOnScreenMessage(
'info',
$lng->
txt(
"msg_obj_modified"),
true);
488 $ilCtrl->setParameter($this,
"grp", $this->std_request->getGroup());
489 $ilCtrl->redirect($this,
"showPageEditorSettings");
495 $this->tabs_gui->activateTab(
"adve_page_editor_settings");
498 $this->tpl->setContent($form->
getHTML());
509 $cb->
setInfo($this->
lng->txt(
"adve_use_physical_info"));
510 $cb->setChecked((
bool) $aset->get(
"use_physical"));
515 $cb->
setChecked((
bool) $aset->get(
"block_mode_minutes") > 0);
521 $ni->setMaxLength(5);
523 $ni->setRequired(
true);
524 $ni->setInfo($this->
lng->txt(
"adve_minutes_info"));
525 $ni->setValue($aset->get(
"block_mode_minutes"));
526 $cb->addSubItem($ni);
531 $as->setMaxLength(5);
533 $as->setInfo($this->
lng->txt(
"adve_autosave_info"));
534 $as->setValue($aset->get(
"autosave"));
539 $cb->
setChecked((
bool) $aset->get(
"auto_url_linking"));
540 $cb->setInfo($this->
lng->txt(
"adve_auto_url_linking_info"));
551 $form->
setTitle($this->
lng->txt(
"adve_pe_general"));
566 return [
"lobj",
"copa",
"mep",
"blp",
"prtf",
"prtt",
"gdf",
"lm",
"qht",
"qpl",
"qfbg",
"qfbs",
"sahs",
"stys",
"cont",
"cstr",
"auth"];
579 if ($autosave > 0 && $autosave < 10) {
580 $form->
getItemByPostVar(
"autosave")->setAlert($this->
lng->txt(
"adve_autosave_info_min_10"));
586 $aset->set(
"use_physical", $form->
getInput(
"use_physical"));
587 if ($form->
getInput(
"block_mode_act")) {
588 $aset->set(
"block_mode_minutes", (
string) (
int) $form->
getInput(
"block_mode_minutes"));
590 $aset->set(
"block_mode_minutes", 0);
592 $aset->set(
"auto_url_linking", $form->
getInput(
"auto_url_linking"));
594 $aset->set(
"autosave", $form->
getInput(
"autosave"));
596 $this->tpl->setOnScreenMessage(
'success', $this->
lng->txt(
"msg_obj_modified"),
true);
597 $this->
ctrl->redirect($this,
"showGeneralPageEditorSettings");
602 $this->tpl->setContent($form->
getHTML());
624 $this->tabs_gui->activateTab(
"adve_char_selector_settings");
627 $char_selector->getConfig()->setAvailability((
int) $this->
settings->get(
'char_selector_availability'));
628 $char_selector->getConfig()->setDefinition((
string) $this->
settings->get(
'char_selector_definition'));
630 $char_selector->setFormValues($form);
631 $this->tpl->setContent($form->
getHTML());
645 $char_selector->getFormValues($form);
647 $this->
settings->set(
'char_selector_availability', $char_selector->getConfig()->getAvailability());
648 $this->
settings->set(
'char_selector_definition', $char_selector->getConfig()->getDefinition());
650 $this->tpl->setOnScreenMessage(
'success', $this->
lng->txt(
"msg_obj_modified"),
true);
651 $this->
ctrl->redirect($this,
"showCharSelectorSettings");
654 $this->tpl->setContent($form->
getHTML());
saveExcAssSettingsObject()
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
Readable part of repository interface to ilComponentDataDB.
saveTags(string $a_id, string $a_cmd, ilPropertyFormGUI $form)
txt(string $a_topic, string $a_default_lang_fallback_mod="")
gets the text for a given topic if the topic is not in the list, the topic itself with "-" will be re...
static _getRichTextEditor()
Returns the identifier for the Rich Text Editor.
__construct($data, int $id=0, bool $call_by_reference=true, bool $prepare_output=true)
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
StandardGUIRequest $std_request
prepareOutput(bool $show_sub_objects=true)
addPageEditorSettingsSubtabs()
saveCharSelectorSettingsObject()
Save the settings for the selector of unicode characters.
showGeneralPageEditorSettingsObject()
saveGeneralPageSettingsObject()
static getGroups()
Get all settings groups.
getPageObjectKeysWithOptionalHTML()
This limits the possibility to allow html for these page objects that supported the feature in the pa...
static lookupSetting(string $a_grp, string $a_name, string $a_default='0')
Lookup setting.
static writeSetting(string $a_grp, string $a_name, string $a_value)
Write Setting.
showPageEditorSettingsObject()
ilGlobalTemplateInterface $tpl
saveFrmPostSettingsObject()
setContent(string $a_html)
Sets content for standard template.
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.
static setShortTextsDirtyGlobally()
Set short texts dirty (for all glossaries)
ilComponentRepository $component_repository
showCharSelectorSettingsObject()
Show the settings for the selector of unicode characters.
header include for all ilias files.
form( $class_path, string $cmd)
checkPermissionBool(string $perm, string $cmd="", string $type="", ?int $ref_id=null)
initCharSelectorSettingsForm(ilCharSelectorGUI $char_selector)
__construct(Container $dic, ilPlugin $plugin)
initTagsForm(string $a_id, string $a_cmd, string $a_title)
static _getCommonBBButtons()
savePageEditorSettingsObject()
Class ilObjAdvancedEditingGUI.
New PermissionGUI (extends from old ilPermission2GUI) RBAC related output.
initGeneralPageSettingsForm()
saveSurveySettingsObject()
checkPermission(string $perm, string $cmd="", string $type="", ?int $ref_id=null)
static _getUsedHTMLTags(string $a_module="")
Returns an array of all allowed HTML tags for text editing.