38 bool $a_call_by_reference
43 $this->component_repository = $DIC[
"component.repository"];
44 $this->current_user = $DIC[
'ilUser'];
48 $this->
lng->loadLanguageModule(
'adve');
49 $this->
lng->loadLanguageModule(
'meta');
58 if (!$this->rbac_system->checkAccess(
'read', $this->object->getRefId())) {
59 $mess = str_replace(
"%s", $this->
object->getTitle(), $this->
lng->txt(
"msg_no_perm_read_item"));
60 $this->
ilias->raiseError($mess, $this->
ilias->error_obj->WARNING);
63 $next_class = $this->
ctrl->getNextClass($this);
64 $cmd = $this->
ctrl->getCmd();
67 switch ($next_class) {
68 case 'ilpermissiongui':
70 $this->
ctrl->forwardCommand($perm_gui);
73 case strtolower(ilRTESettingsGUI::class):
87 if ($cmd ===
null || $cmd ===
"" || $cmd ===
"view") {
88 $cmd =
"showGeneralPageEditorSettings";
101 parent::saveObject();
104 $this->tpl->setOnScreenMessage(
'success', $this->
lng->txt(
"object_added"),
true);
105 $this->
ctrl->redirect($this);
115 $this->tabs_gui->addSubTabTarget(
117 $this->
ctrl->getLinkTarget($this,
"showGeneralPageEditorSettings"),
118 array(
"showGeneralPageEditorSettings",
"",
"view")
123 foreach ($grps as $g => $types) {
124 $this->
ctrl->setParameter($this,
"grp", $g);
125 $this->tabs_gui->addSubTabTarget(
127 $this->
ctrl->getLinkTarget($this,
"showPageEditorSettings"),
128 array(
"showPageEditorSettings")
131 $this->
ctrl->setParameter($this,
"grp", $this->std_request->getGroup());
136 if ($this->rbac_system->checkAccess(
"visible,read", $this->object->getRefId())) {
137 $this->tabs_gui->addTarget(
138 "adve_page_editor_settings",
139 $this->
ctrl->getLinkTarget($this,
"showGeneralPageEditorSettings"),
140 array(
"showPageEditorSettings",
"",
"view")
143 $this->tabs_gui->addTarget(
145 $this->
ctrl->getLinkTargetByClass([self::class, ilRTESettingsGUI::class],
"settings"),
146 array(
"settings",
"assessment",
"frmPost"),
152 if ($this->rbac_system->checkAccess(
'edit_permission', $this->object->getRefId())) {
153 $this->tabs_gui->addTarget(
155 $this->
ctrl->getLinkTargetByClass(array(get_class($this),
'ilpermissiongui'),
"perm"),
156 array(
"perm",
"info",
"owner"),
168 $this->cgrp = $this->std_request->getGroup();
169 if ($this->cgrp ===
"") {
170 $this->cgrp = (string) key($grps);
173 $this->
ctrl->setParameter($this,
"grp", $this->cgrp);
174 $this->tabs_gui->setSubTabActive(
"adve_grp_" . $this->cgrp);
177 $this->tpl->setContent($this->
form->getHTML());
182 $this->
lng->loadLanguageModule(
"content");
186 if ($this->cgrp ===
"test") {
187 $this->
form->setTitle($this->
lng->txt(
"adve_activation"));
189 $cb->setInfo($this->
lng->txt(
"advanced_editing_tst_editing_desc"));
191 $cb->setChecked(
true);
193 $this->
form->addItem($cb);
196 $sh->setTitle($this->
lng->txt(
"adve_text_content_features"));
197 $this->
form->addItem($sh);
198 } elseif ($this->cgrp ===
"rep") {
199 $this->
form->setTitle($this->
lng->txt(
"adve_activation"));
201 $cb->setInfo($this->
lng->txt(
"advanced_editing_rep_page_editing_desc"));
202 if ($this->
settings->get(
"enable_cat_page_edit")) {
203 $cb->setChecked(
true);
205 $this->
form->addItem($cb);
208 $sh->setTitle($this->
lng->txt(
"adve_text_content_features"));
209 $this->
form->addItem($sh);
211 $this->
form->setTitle($this->
lng->txt(
"adve_text_content_features"));
216 foreach ($buttons as
$b => $t) {
220 $this->
form->addItem($cb);
225 $this->
form->addCommandButton(
"savePageEditorSettings", $this->
lng->txt(
"save"));
228 $this->
form->setFormAction($this->
ctrl->getFormAction($this));
240 if ($this->
form->checkInput()) {
242 foreach ($buttons as
$b => $t) {
244 $this->std_request->getGroup(),
246 $this->
form->getInput(
"active_" .
$b)
250 if ($this->std_request->getGroup() ===
"test") {
251 $ilSetting->set(
"enable_tst_page_edit", (
string) $this->
form->getInput(
"tst_page_edit"));
252 } elseif ($this->std_request->getGroup() ===
"rep") {
253 $ilSetting->set(
"enable_cat_page_edit", (
string) $this->
form->getInput(
"cat_page_edit"));
256 $this->tpl->setOnScreenMessage(
'info',
$lng->
txt(
"msg_obj_modified"),
true);
259 $ilCtrl->setParameter($this,
"grp", $this->std_request->getGroup());
260 $ilCtrl->redirect($this,
"showPageEditorSettings");
266 $this->tabs_gui->activateTab(
"adve_page_editor_settings");
269 $this->tpl->setContent($form->
getHTML());
280 $cb->setInfo($this->
lng->txt(
"adve_use_physical_info"));
281 $cb->setChecked((
bool) $aset->get(
"use_physical"));
286 $cb->setChecked((
bool) $aset->get(
"block_mode_minutes") > 0);
292 $ni->setMaxLength(5);
294 $ni->setRequired(
true);
295 $ni->setInfo($this->
lng->txt(
"adve_minutes_info"));
296 $ni->setValue($aset->get(
"block_mode_minutes"));
297 $cb->addSubItem($ni);
302 $as->setMaxLength(5);
304 $as->setInfo($this->
lng->txt(
"adve_autosave_info"));
305 $as->setValue($aset->get(
"autosave"));
310 $cb->setChecked((
bool) $aset->get(
"auto_url_linking"));
311 $cb->setInfo($this->
lng->txt(
"adve_auto_url_linking_info"));
322 $form->
setTitle($this->
lng->txt(
"adve_pe_general"));
337 return [
"lobj",
"copa",
"mep",
"blp",
"prtf",
"prtt",
"term",
"lm",
"qht",
"qpl",
"qfbg",
"qfbs",
"sahs",
"stys",
"cont",
"cstr",
"auth"];
350 if ($autosave > 0 && $autosave < 10) {
351 $form->
getItemByPostVar(
"autosave")->setAlert($this->
lng->txt(
"adve_autosave_info_min_10"));
357 $aset->set(
"use_physical", $form->
getInput(
"use_physical"));
358 if ($form->
getInput(
"block_mode_act")) {
359 $aset->set(
"block_mode_minutes", (
string) (
int) $form->
getInput(
"block_mode_minutes"));
361 $aset->set(
"block_mode_minutes", 0);
363 $aset->set(
"auto_url_linking", $form->
getInput(
"auto_url_linking"));
365 $aset->set(
"autosave", $form->
getInput(
"autosave"));
367 $this->tpl->setOnScreenMessage(
'success', $this->
lng->txt(
"msg_obj_modified"),
true);
368 $this->
ctrl->redirect($this,
"showGeneralPageEditorSettings");
373 $this->tpl->setContent($form->
getHTML());
Readable part of repository interface to ilComponentDataDB.
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...
StandardGUIRequest $std_request
prepareOutput(bool $show_sub_objects=true)
addPageEditorSettingsSubtabs()
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.
while($session_entry=$r->fetchRow(ilDBConstants::FETCHMODE_ASSOC)) return null
showPageEditorSettingsObject()
Class ilObjectGUI Basic methods of all Output classes.
ilComponentRepository $component_repository
Class ilObjForumAdministration.
checkPermissionBool(string $perm, string $cmd="", string $type="", ?int $ref_id=null)
form( $class_path, string $cmd, string $submit_caption="")
const ADDITIONAL_QUESTION_CONTENT_EDITING_MODE_PAGE_OBJECT_DISABLED
__construct(Container $dic, ilPlugin $plugin)
static _getCommonBBButtons()
savePageEditorSettingsObject()
Class ilObjAdvancedEditingGUI.
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
initGeneralPageSettingsForm()
static setShortTextsDirtyGlobally()
Set short texts dirty (for all glossaries)
checkPermission(string $perm, string $cmd="", string $type="", ?int $ref_id=null)
Class ilObjAdvancedEditingGUI.