ILIAS  release_5-4 Revision v5.4.26-12-gabc799a52e6
ilObjAdvancedEditingGUI Class Reference

Class ilObjAdvancedEditingGUI. More...

+ Inheritance diagram for ilObjAdvancedEditingGUI:
+ Collaboration diagram for ilObjAdvancedEditingGUI:

Public Member Functions

 __construct ($a_data, $a_id, $a_call_by_reference)
 Constructor. More...
 
 executeCommand ()
 execute command More...
 
 saveObject ()
 save object @access public More...
 
 getAdminTabs ()
 administration tabs show only permissions and trash folder More...
 
 addSubtabs ()
 Add rte subtabs. More...
 
 addPageEditorSettingsSubtabs ()
 Show page editor settings subtabs. More...
 
 getTabs ()
 get tabs @access public More...
 
 settingsObject ()
 Display assessment folder settings form. More...
 
 saveSettingsObject ()
 Save Assessment settings. More...
 
 assessmentObject ()
 Display settings for test and assessment. More...
 
 saveAssessmentSettingsObject ()
 
 surveyObject ()
 Display settings for surveys. More...
 
 saveSurveySettingsObject ()
 
 frmPostObject ()
 Display settings for forums. More...
 
 saveFrmPostSettingsObject ()
 
 excAssObject ()
 Display settings for exercise assignments. More...
 
 saveExcAssSettingsObject ()
 
 showPageEditorSettingsObject ()
 Show page editor settings. More...
 
 initPageEditorForm ($a_mode="edit")
 Init page editor form. More...
 
 savePageEditorSettingsObject ()
 Save page editor settings form. More...
 
 showGeneralPageEditorSettingsObject ()
 Show general page editor settings. More...
 
 initGeneralPageSettingsForm ()
 Init general page editor settings form. More...
 
 saveGeneralPageSettingsObject ()
 Save general page settings. More...
 
 initCharSelectorSettingsForm (ilCharSelectorGUI $char_selector)
 Init the settings form for the selector of unicode characters. More...
 
 showCharSelectorSettingsObject ()
 Show the settings for the selector of unicode characters. More...
 
 saveCharSelectorSettingsObject ()
 Save the settings for the selector of unicode characters. More...
 
- Public Member Functions inherited from ilObjectGUI
 executeCommand ()
 execute command More...
 
 withReferences ()
 determines wether objects are referenced or not (got ref ids or not) More...
 
 setCreationMode ($a_mode=true)
 if true, a creation screen is displayed the current $_GET[ref_id] don't belong to the current class! the mode is determined in ilrepositorygui More...
 
 getCreationMode ()
 get creation mode More...
 
 prepareOutput ($a_show_subobjects=true)
 prepare output More...
 
 getAdminTabs ()
 administration tabs show only permissions and trash folder More...
 
 getHTML ()
 
 confirmedDeleteObject ()
 confirmed deletion of object -> objects are moved to trash or deleted immediately, if trash is disabled More...
 
 cancelDeleteObject ()
 cancel deletion of object More...
 
 cancelObject ()
 cancel action and go back to previous page @access public More...
 
 createObject ()
 create new object form More...
 
 cancelCreation ()
 cancel create action and go back to repository parent More...
 
 saveObject ()
 save object More...
 
 getDidacticTemplateVar ($a_type)
 Get didactic template setting from creation screen. More...
 
 putObjectInTree (ilObject $a_obj, $a_parent_node_id=null)
 Add object to tree at given position. More...
 
 editObject ()
 edit object More...
 
 addExternalEditFormCustom (ilPropertyFormGUI $a_form)
 
 updateObject ()
 updates object entry in object_data More...
 
 getFormAction ($a_cmd, $a_formaction="")
 get form action for command (command is method name without "Object", e.g. More...
 
 isVisible ($a_ref_id, $a_type)
 
 viewObject ()
 list childs of current object More...
 
 deleteObject ($a_error=false)
 Display deletion confirmation screen. More...
 
 cloneAllObject ()
 Clone single (not container object) Method is overwritten in ilContainerGUI. More...
 
 redirectAfterCreation ()
 Redirect after creation, see https://docu.ilias.de/goto_docu_wiki_wpage_5035_1357.html. More...
 

Data Fields

 $conditions
 
- Data Fields inherited from ilObjectGUI
const COPY_WIZARD_NEEDS_PAGE = 1
 
 $objDefinition
 
 $tpl
 
 $tree
 
 $lng
 
 $data
 
 $object
 
 $ref_id
 
 $obj_id
 
 $maxcount
 
 $formaction
 
 $return_location
 
 $target_frame
 
 $tab_target_script
 
 $actions
 
 $sub_objects
 
 $omit_locator = false
 
const CFORM_NEW = 1
 
const CFORM_IMPORT = 2
 
const CFORM_CLONE = 3
 

Protected Member Functions

 initTagsForm ($a_id, $a_cmd, $a_title)
 
 saveTags ($a_id, $a_cmd, $form)
 
 getPageObjectKeysWithOptionalHTML ()
 This limits the possibility to allow html for these page objects that supported the feature in the past. More...
 
- Protected Member Functions inherited from ilObjectGUI
 getObjectService ()
 Get object service. More...
 
 assignObject ()
 
 setTitleAndDescription ()
 called by prepare output More...
 
 initHeaderAction ($a_sub_type=null, $a_sub_id=null)
 Add header action menu. More...
 
 insertHeaderAction ($a_list_gui)
 Insert header action into main template. More...
 
 addHeaderAction ()
 Add header action menu. More...
 
 redrawHeaderActionObject ()
 Ajax call: redraw action header only. More...
 
 showMountWebfolderIcon ()
 
 setTabs ()
 set admin tabs @access public More...
 
 setAdminTabs ()
 set admin tabs @access public More...
 
 setLocator ()
 set Locator More...
 
 addLocatorItems ()
 should be overwritten to add object specific items (repository items are preloaded) More...
 
 omitLocator ($a_omit=true)
 
 addAdminLocatorItems ($a_do_not_add_object=false)
 should be overwritten to add object specific items (repository items are preloaded) More...
 
 initCreationForms ($a_new_type)
 Init creation froms. More...
 
 getCreationFormsHTML (array $a_forms)
 Get HTML for creation forms (accordion) More...
 
 initCreateForm ($a_new_type)
 Init object creation form. More...
 
 initDidacticTemplate (ilPropertyFormGUI $form)
 Show didactic template types. More...
 
 addDidacticTemplateOptions (array &$a_options)
 Add custom templates. More...
 
 afterSave (ilObject $a_new_object)
 Post (successful) object creation hook. More...
 
 initEditForm ()
 Init object edit form. More...
 
 initEditCustomForm (ilPropertyFormGUI $a_form)
 Add custom fields to update form. More...
 
 getEditFormValues ()
 Get values for edit form. More...
 
 getEditFormCustomValues (array &$a_values)
 Add values to custom edit fields. More...
 
 validateCustom (ilPropertyFormGUI $a_form)
 Validate custom values (if not possible with checkInput()) More...
 
 updateCustom (ilPropertyFormGUI $a_form)
 Insert custom update form values into object. More...
 
 afterUpdate ()
 Post (successful) object update hook. More...
 
 initImportForm ($a_new_type)
 Init object import form. More...
 
 importFileObject ($parent_id=null, $a_catch_errors=true)
 Import. More...
 
 afterImport (ilObject $a_new_object)
 Post (successful) object import hook. More...
 
 setFormAction ($a_cmd, $a_formaction)
 set specific form action for command More...
 
 getReturnLocation ($a_cmd, $a_location="")
 get return location for command (command is method name without "Object", e.g. More...
 
 setReturnLocation ($a_cmd, $a_location)
 set specific return location for command More...
 
 getTargetFrame ($a_cmd, $a_target_frame="")
 get target frame for command (command is method name without "Object", e.g. More...
 
 setTargetFrame ($a_cmd, $a_target_frame)
 set specific target frame for command More...
 
 showPossibleSubObjects ()
 show possible subobjects (pulldown menu) More...
 
 getTemplateFile ($a_cmd, $a_type="")
 get a template blockfile format: tpl. More...
 
 getTabs ()
 get tabs abstract method. More...
 
 __showButton ($a_cmd, $a_text, $a_target='')
 
 hitsperpageObject ()
 
__initTableGUI ()
 
 __setTableGUIBasicData (&$tbl, &$result_set, $a_from="")
 standard implementation for tables use 'from' variable use different initial setting of table More...
 
 redirectToRefId ($a_ref_id, $a_cmd="")
 redirects to (repository) view per ref id usually to a container and usually used at the end of a save/import method where the object gui type (of the new object) doesn't match with the type of the current $_GET["ref_id"] value More...
 
 fillCloneTemplate ($a_tpl_varname, $a_type)
 Fill object clone template This method can be called from any object GUI class that wants to offer object cloning. More...
 
 getCenterColumnHTML ()
 Get center column. More...
 
 getRightColumnHTML ()
 Display right column. More...
 
 setColumnSettings (ilColumnGUI $column_gui)
 May be overwritten in subclasses. More...
 
 checkPermission ($a_perm, $a_cmd="", $a_type="", $a_ref_id=null)
 Check permission and redirect on error. More...
 
 checkPermissionBool ($a_perm, $a_cmd="", $a_type="", $a_ref_id=null)
 Check permission. More...
 
 enableDragDropFileUpload ()
 Enables the file upload into this object by dropping files. More...
 
 handleAutoRating (ilObject $a_new_obj)
 Activate rating automatically if parent container setting. More...
 

Protected Attributes

 $rbacsystem
 
 $rbacadmin
 
 $tabs
 
 $access
 
 $settings
 
- Protected Attributes inherited from ilObjectGUI
 $ilErr
 
 $locator
 
 $user
 
 $access
 
 $settings
 
 $rbacreview
 
 $toolbar
 
 $tmp_import_dir
 
 $tabs_gui = null
 
 $ctrl
 
 $object_service
 

Additional Inherited Members

- Static Public Member Functions inherited from ilObjectGUI
static _gotoRepositoryRoot ($a_raise_error=false)
 Goto repository root. More...
 
static _gotoRepositoryNode ($a_ref_id, $a_cmd="frameset")
 Goto repository root. More...
 

Detailed Description

Class ilObjAdvancedEditingGUI.

Author
Helmut Schottmüller hscho.nosp@m.ttm@.nosp@m.gmx.d.nosp@m.e
Version
$Id$

@ilCtrl_Calls ilObjAdvancedEditingGUI: ilPermissionGUI

Definition at line 17 of file class.ilObjAdvancedEditingGUI.php.

Constructor & Destructor Documentation

◆ __construct()

ilObjAdvancedEditingGUI::__construct (   $a_data,
  $a_id,
  $a_call_by_reference 
)

Constructor.

Definition at line 49 of file class.ilObjAdvancedEditingGUI.php.

50 {
51 global $DIC;
52
53 $this->rbacsystem = $DIC->rbac()->system();
54 $this->rbacadmin = $DIC->rbac()->admin();
55 $this->ctrl = $DIC->ctrl();
56 $this->tabs = $DIC->tabs();
57 $this->tpl = $DIC["tpl"];
58 $this->lng = $DIC->language();
59 $this->access = $DIC->access();
60 $this->settings = $DIC->settings();
61 $rbacsystem = $DIC->rbac()->system();
62
63 $this->type = "adve";
64 parent::__construct($a_data, $a_id, $a_call_by_reference, false);
65 $this->lng->loadLanguageModule('adve');
66 $this->lng->loadLanguageModule('meta');
67
68 if (!$rbacsystem->checkAccess('read', $this->object->getRefId())) {
69 $this->ilias->raiseError($this->lng->txt("msg_no_perm_read_adve"), $this->ilias->error_obj->WARNING);
70 }
71 }
redirection script todo: (a better solution should control the processing via a xml file)
global $DIC
Definition: saml.php:7
settings()
Definition: settings.php:2

References $DIC, $rbacsystem, and settings().

+ Here is the call graph for this function:

Member Function Documentation

◆ addPageEditorSettingsSubtabs()

ilObjAdvancedEditingGUI::addPageEditorSettingsSubtabs ( )

Show page editor settings subtabs.

Definition at line 170 of file class.ilObjAdvancedEditingGUI.php.

171 {
173 $ilTabs = $this->tabs;
174
175 $ilTabs->addSubTabTarget(
176 "adve_pe_general",
177 $ilCtrl->getLinkTarget($this, "showGeneralPageEditorSettings"),
178 array("showGeneralPageEditorSettings", "", "view")
179 );
180
181 include_once("./Services/COPage/classes/class.ilPageEditorSettings.php");
183
184 foreach ($grps as $g => $types) {
185 $ilCtrl->setParameter($this, "grp", $g);
186 $ilTabs->addSubTabTarget(
187 "adve_grp_" . $g,
188 $ilCtrl->getLinkTarget($this, "showPageEditorSettings"),
189 array("showPageEditorSettings")
190 );
191 }
192 $ilCtrl->setParameter($this, "grp", $_GET["grp"]);
193 }
$_GET["client_id"]
static getGroups()
Get all settings groups.
global $ilCtrl
Definition: ilias.php:18

References $_GET, ilObjectGUI\$ctrl, $ilCtrl, $tabs, and ilPageEditorSettings\getGroups().

+ Here is the call graph for this function:

◆ addSubtabs()

ilObjAdvancedEditingGUI::addSubtabs ( )

Add rte subtabs.

Definition at line 122 of file class.ilObjAdvancedEditingGUI.php.

123 {
125
126 if ($ilCtrl->getNextClass() != "ilpermissiongui" &&
127 !in_array($ilCtrl->getCmd(), array("showPageEditorSettings",
128 "showGeneralPageEditorSettings", "showCharSelectorSettings", "", "view"))) {
129 $this->tabs_gui->addSubTabTarget(
130 "adve_general_settings",
131 $this->ctrl->getLinkTarget($this, "settings"),
132 array("settings", "saveSettings"),
133 "",
134 ""
135 );
136 $this->tabs_gui->addSubTabTarget(
137 "adve_assessment_settings",
138 $this->ctrl->getLinkTarget($this, "assessment"),
139 array("assessment", "saveAssessmentSettings"),
140 "",
141 ""
142 );
143 $this->tabs_gui->addSubTabTarget(
144 "adve_survey_settings",
145 $this->ctrl->getLinkTarget($this, "survey"),
146 array("survey", "saveSurveySettings"),
147 "",
148 ""
149 );
150 $this->tabs_gui->addSubTabTarget(
151 "adve_frm_post_settings",
152 $this->ctrl->getLinkTarget($this, "frmPost"),
153 array("frmPost", "saveFrmPostSettings"),
154 "",
155 ""
156 );
157 $this->tabs_gui->addSubTabTarget(
158 "adve_excass_settings",
159 $this->ctrl->getLinkTarget($this, "excass"),
160 array("excass", "saveExcAssSettings"),
161 "",
162 ""
163 );
164 }
165 }

References ilObjectGUI\$ctrl, and $ilCtrl.

Referenced by getTabs().

+ Here is the caller graph for this function:

◆ assessmentObject()

ilObjAdvancedEditingGUI::assessmentObject ( )

Display settings for test and assessment.

Definition at line 286 of file class.ilObjAdvancedEditingGUI.php.

287 {
288 $form = $this->initTagsForm(
289 "assessment",
290 "saveAssessmentSettings",
291 "advanced_editing_assessment_settings"
292 );
293
294 $this->tpl->setContent($form->getHTML());
295 }
initTagsForm($a_id, $a_cmd, $a_title)
if(isset($_POST['submit'])) $form

References $form, and initTagsForm().

+ Here is the call graph for this function:

◆ excAssObject()

ilObjAdvancedEditingGUI::excAssObject ( )

Display settings for exercise assignments.

Definition at line 370 of file class.ilObjAdvancedEditingGUI.php.

371 {
372 $form = $this->initTagsForm(
373 "exc_ass",
374 "saveExcAssSettings",
375 "advanced_editing_excass_settings"
376 );
377
378 $this->tpl->setContent($form->getHTML());
379 }

References $form, and initTagsForm().

+ Here is the call graph for this function:

◆ executeCommand()

ilObjAdvancedEditingGUI::executeCommand ( )

execute command

Reimplemented from ilObjectGUI.

Definition at line 73 of file class.ilObjAdvancedEditingGUI.php.

74 {
75 $next_class = $this->ctrl->getNextClass($this);
76 $cmd = $this->ctrl->getCmd();
77 $this->prepareOutput();
78
79 switch ($next_class) {
80
81 case 'ilpermissiongui':
82 include_once("Services/AccessControl/classes/class.ilPermissionGUI.php");
83 $perm_gui = new ilPermissionGUI($this);
84 $ret = &$this->ctrl->forwardCommand($perm_gui);
85 break;
86
87 default:
88 if ($cmd == "" || $cmd == "view") {
89 $cmd = "showGeneralPageEditorSettings";
90 }
91 $cmd .= "Object";
92 $this->$cmd();
93
94 break;
95 }
96 return true;
97 }
prepareOutput($a_show_subobjects=true)
prepare output
New PermissionGUI (extends from old ilPermission2GUI) RBAC related output.
$ret
Definition: parser.php:6

References $ret, and ilObjectGUI\prepareOutput().

+ Here is the call graph for this function:

◆ frmPostObject()

ilObjAdvancedEditingGUI::frmPostObject ( )

Display settings for forums.

Definition at line 342 of file class.ilObjAdvancedEditingGUI.php.

343 {
344 $form = $this->initTagsForm(
345 "frm_post",
346 "saveFrmPostSettings",
347 "advanced_editing_frm_post_settings"
348 );
349
350 $this->tpl->setContent($form->getHTML());
351 }

References $form, and initTagsForm().

+ Here is the call graph for this function:

◆ getAdminTabs()

ilObjAdvancedEditingGUI::getAdminTabs ( )

administration tabs show only permissions and trash folder

Reimplemented from ilObjectGUI.

Definition at line 114 of file class.ilObjAdvancedEditingGUI.php.

115 {
116 $this->getTabs();
117 }

References getTabs().

+ Here is the call graph for this function:

◆ getPageObjectKeysWithOptionalHTML()

ilObjAdvancedEditingGUI::getPageObjectKeysWithOptionalHTML ( )
protected

This limits the possibility to allow html for these page objects that supported the feature in the past.

PLEASE do not add additional keys here. The whole feature might be abandonded in the future.

Returns
array

Definition at line 678 of file class.ilObjAdvancedEditingGUI.php.

679 {
680 return ["lobj","copa","mep","blp","prtf","prtt","gdf","lm","qht","qpl","qfbg","qfbs","sahs","stys","cont","cstr","auth"];
681 }

Referenced by initGeneralPageSettingsForm(), and saveGeneralPageSettingsObject().

+ Here is the caller graph for this function:

◆ getTabs()

ilObjAdvancedEditingGUI::getTabs ( )

get tabs @access public

Parameters
objecttabs gui object

Reimplemented from ilObjectGUI.

Definition at line 200 of file class.ilObjAdvancedEditingGUI.php.

201 {
203
204 if ($rbacsystem->checkAccess("visible,read", $this->object->getRefId())) {
205 $this->tabs_gui->addTarget(
206 "adve_page_editor_settings",
207 $this->ctrl->getLinkTarget($this, "showGeneralPageEditorSettings"),
208 array("showPageEditorSettings", "","view")
209 );
210
211 $this->tabs_gui->addTarget(
212 "adve_rte_settings",
213 $this->ctrl->getLinkTarget($this, "settings"),
214 array("settings","assessment", "survey", "frmPost", "excass"),
215 "",
216 ""
217 );
218
219 $this->tabs_gui->addTarget(
220 "adve_char_selector_settings",
221 $this->ctrl->getLinkTarget($this, "showCharSelectorSettings"),
222 array("showCharSelectorSettings", "","view")
223 );
224 }
225
226 if ($rbacsystem->checkAccess('edit_permission', $this->object->getRefId())) {
227 $this->tabs_gui->addTarget(
228 "perm_settings",
229 $this->ctrl->getLinkTargetByClass(array(get_class($this),'ilpermissiongui'), "perm"),
230 array("perm","info","owner"),
231 'ilpermissiongui'
232 );
233 }
234 $this->addSubtabs($this->tabs_gui);
235 }

References $rbacsystem, and addSubtabs().

Referenced by getAdminTabs().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ initCharSelectorSettingsForm()

ilObjAdvancedEditingGUI::initCharSelectorSettingsForm ( ilCharSelectorGUI  $char_selector)

Init the settings form for the selector of unicode characters.

Definition at line 723 of file class.ilObjAdvancedEditingGUI.php.

724 {
727
728 include_once("Services/Form/classes/class.ilPropertyFormGUI.php");
729 $form = new ilPropertyFormGUI();
730 $form->setTitle($lng->txt('settings'));
731 $form->setFormAction($ilCtrl->getFormAction($this));
732 if ($this->checkPermissionBool("write")) {
733 $form->addCommandButton("saveCharSelectorSettings", $lng->txt("save"));
734 }
735 $char_selector->addFormProperties($form);
736
737 return $form;
738 }
addFormProperties(ilPropertyFormGUI $a_form)
add the configuration elements to a property form
checkPermissionBool($a_perm, $a_cmd="", $a_type="", $a_ref_id=null)
Check permission.
This class represents a property form user interface.

References ilObjectGUI\$ctrl, $form, $ilCtrl, ilObjectGUI\$lng, ilCharSelectorGUI\addFormProperties(), and ilObjectGUI\checkPermissionBool().

Referenced by saveCharSelectorSettingsObject(), and showCharSelectorSettingsObject().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ initGeneralPageSettingsForm()

ilObjAdvancedEditingGUI::initGeneralPageSettingsForm ( )

Init general page editor settings form.

Definition at line 595 of file class.ilObjAdvancedEditingGUI.php.

596 {
599
600 include_once("Services/Form/classes/class.ilPropertyFormGUI.php");
601 $form = new ilPropertyFormGUI();
602
603 $aset = new ilSetting("adve");
604
605 // use physical character styles
606 $cb = new ilCheckboxInputGUI($this->lng->txt("adve_use_physical"), "use_physical");
607 $cb->setInfo($this->lng->txt("adve_use_physical_info"));
608 $cb->setChecked($aset->get("use_physical"));
609 $form->addItem($cb);
610
611 // blocking mode
612 $cb = new ilCheckboxInputGUI($this->lng->txt("adve_blocking_mode"), "block_mode_act");
613 $cb->setChecked($aset->get("block_mode_minutes") > 0);
614 $form->addItem($cb);
615
616 // number of minutes
617 $ni = new ilNumberInputGUI($this->lng->txt("adve_minutes"), "block_mode_minutes");
618 $ni->setMinValue(2);
619 $ni->setMaxLength(5);
620 $ni->setSize(5);
621 $ni->setRequired(true);
622 $ni->setInfo($this->lng->txt("adve_minutes_info"));
623 $ni->setValue($aset->get("block_mode_minutes"));
624 $cb->addSubItem($ni);
625
626 // auto url linking
627 $cb = new ilCheckboxInputGUI($this->lng->txt("adve_auto_url_linking"), "auto_url_linking");
628 $cb->setChecked($aset->get("auto_url_linking"));
629 $cb->setInfo($this->lng->txt("adve_auto_url_linking_info"));
630 $form->addItem($cb);
631
632 if ($this->checkPermissionBool("write")) {
633 $form->addCommandButton("saveGeneralPageSettings", $lng->txt("save"));
634 }
635
636 // enable html/js
637 $this->lng->loadLanguageModule("copg");
638 $sh = new ilFormSectionHeaderGUI();
639 $sh->setTitle($lng->txt("copg_allow_html"));
640 $sh->setInfo($lng->txt("copg_allow_html_info"));
641 $form->addItem($sh);
642
643 $comps = ilComponent::getAll();
644 $comps_per_dir = array_column(array_map(function ($k, $v) {
645 return [$v["type"] . "/" . $v["name"], $v];
646 }, array_keys($comps), $comps), 1, 0);
647
648 $cdef = new ilCOPageObjDef();
649 foreach ($cdef->getDefinitions() as $key => $def) {
650 if (in_array($key, $this->getPageObjectKeysWithOptionalHTML())) {
651 $comp_id = $comps_per_dir[$def["component"]]["id"];
652 $this->lng->loadLanguageModule($comp_id);
653 $cb = new ilCheckboxInputGUI($def["component"] . ": " . $this->lng->txt($comp_id . "_page_type_" . $key), "act_html_" . $key);
654 $cb->setChecked($aset->get("act_html_" . $key));
655 $form->addItem($cb);
656 }
657 }
658
659 // workaround for glossaries to force rewriting of shot texts
661
662
663 $form->setTitle($lng->txt("adve_pe_general"));
664 $form->setFormAction($ilCtrl->getFormAction($this));
665
666 return $form;
667 }
COPage page object definition handler.
This class represents a checkbox property in a property form.
static getAll()
Get all.
This class represents a section header in a property form.
static setShortTextsDirtyGlobally()
Set short texts dirty.
This class represents a number property in a property form.
getPageObjectKeysWithOptionalHTML()
This limits the possibility to allow html for these page objects that supported the feature in the pa...
ILIAS Setting Class.
$def
Definition: croninfo.php:21
$key
Definition: croninfo.php:18

References ilObjectGUI\$ctrl, $def, $form, $ilCtrl, $key, ilObjectGUI\$lng, ilObjectGUI\checkPermissionBool(), ilComponent\getAll(), getPageObjectKeysWithOptionalHTML(), and ilGlossaryDefinition\setShortTextsDirtyGlobally().

Referenced by saveGeneralPageSettingsObject(), and showGeneralPageEditorSettingsObject().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ initPageEditorForm()

ilObjAdvancedEditingGUI::initPageEditorForm (   $a_mode = "edit")

Init page editor form.

Parameters
int$a_modeEdit Mode

Definition at line 478 of file class.ilObjAdvancedEditingGUI.php.

479 {
482
483 $lng->loadLanguageModule("content");
484
485 include_once("Services/Form/classes/class.ilPropertyFormGUI.php");
486 $this->form = new ilPropertyFormGUI();
487
488 if ($this->cgrp == "test") {
489 require_once 'Modules/Test/classes/class.ilObjAssessmentFolder.php';
490
491 $this->form->setTitle($lng->txt("adve_activation"));
492 $cb = new ilCheckboxInputGUI($this->lng->txt("advanced_editing_tst_editing"), "tst_page_edit");
493 $cb->setInfo($this->lng->txt("advanced_editing_tst_editing_desc"));
495 $cb->setChecked(true);
496 }
497 $this->form->addItem($cb);
498
499 $sh = new ilFormSectionHeaderGUI();
500 $sh->setTitle($lng->txt("adve_text_content_features"));
501 $this->form->addItem($sh);
502 } elseif ($this->cgrp == "rep") {
503 $this->form->setTitle($lng->txt("adve_activation"));
504 $cb = new ilCheckboxInputGUI($this->lng->txt("advanced_editing_rep_page_editing"), "cat_page_edit");
505 $cb->setInfo($this->lng->txt("advanced_editing_rep_page_editing_desc"));
506 if ($ilSetting->get("enable_cat_page_edit")) {
507 $cb->setChecked(true);
508 }
509 $this->form->addItem($cb);
510
511 $sh = new ilFormSectionHeaderGUI();
512 $sh->setTitle($lng->txt("adve_text_content_features"));
513 $this->form->addItem($sh);
514 } else {
515 $this->form->setTitle($lng->txt("adve_text_content_features"));
516 }
517
518
519 include_once("./Services/COPage/classes/class.ilPageEditorSettings.php");
520
521 include_once("./Services/COPage/classes/class.ilPageContentGUI.php");
523 foreach ($buttons as $b => $t) {
524 // command button activation
525 $cb = new ilCheckboxInputGUI(str_replace(":", "", $this->lng->txt("cont_text_" . $b)), "active_" . $b);
526 $cb->setChecked(ilPageEditorSettings::lookupSetting($this->cgrp, "active_" . $b, true));
527 $this->form->addItem($cb);
528 }
529
530 // save and cancel commands
531 if ($this->checkPermissionBool("write")) {
532 $this->form->addCommandButton("savePageEditorSettings", $lng->txt("save"));
533 }
534
535 $this->form->setFormAction($this->ctrl->getFormAction($this));
536 }
const ADDITIONAL_QUESTION_CONTENT_EDITING_MODE_PAGE_OBJECT_DISABLED
static _getCommonBBButtons()
Get common bb buttons.
static lookupSetting($a_grp, $a_name, $a_default=false)
Lookup setting.
global $ilSetting
Definition: privfeed.php:17

References $ilSetting, ilObjectGUI\$lng, $settings, $t, ilPageContentGUI\_getCommonBBButtons(), ilObjAssessmentFolder\ADDITIONAL_QUESTION_CONTENT_EDITING_MODE_PAGE_OBJECT_DISABLED, ilObjectGUI\checkPermissionBool(), and ilPageEditorSettings\lookupSetting().

Referenced by savePageEditorSettingsObject(), and showPageEditorSettingsObject().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ initTagsForm()

ilObjAdvancedEditingGUI::initTagsForm (   $a_id,
  $a_cmd,
  $a_title 
)
protected

Definition at line 395 of file class.ilObjAdvancedEditingGUI.php.

396 {
397 $ilAccess = $this->access;
398
399 include_once "Services/Form/classes/class.ilPropertyFormGUI.php";
400 $form = new ilPropertyFormGUI();
401 $form->setFormAction($this->ctrl->getFormAction($this, $a_cmd));
402 $form->setTitle($this->lng->txt($a_title));
403
404 $alltags = $this->object->getHTMLTags();
405 $alltags = array_combine($alltags, $alltags);
406
407 include_once "Services/Form/classes/class.ilMultiSelectInputGUI.php";
408 $tags = new ilMultiSelectInputGUI($this->lng->txt("advanced_editing_allow_html_tags"), "html_tags");
409 $tags->setHeight(400);
410 $tags->enableSelectAll(true);
411 $tags->enableSelectedFirst(true);
412 $tags->setOptions($alltags);
414 $form->addItem($tags);
415
416 if ($ilAccess->checkAccess("write", "", $this->object->getRefId())) {
417 $form->addCommandButton($a_cmd, $this->lng->txt("save"));
418 }
419
420 return $form;
421 }
This class represents a multi selection list property in a property form.
static _getUsedHTMLTags($a_module="")
Returns an array of all allowed HTML tags for text editing.
$tags
Definition: croninfo.php:19

References $access, $form, $tags, and ilObjAdvancedEditing\_getUsedHTMLTags().

Referenced by assessmentObject(), excAssObject(), frmPostObject(), saveAssessmentSettingsObject(), saveExcAssSettingsObject(), saveFrmPostSettingsObject(), saveSurveySettingsObject(), and surveyObject().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ saveAssessmentSettingsObject()

ilObjAdvancedEditingGUI::saveAssessmentSettingsObject ( )

Definition at line 297 of file class.ilObjAdvancedEditingGUI.php.

298 {
299 $form = $this->initTagsForm(
300 "assessment",
301 "saveAssessmentSettings",
302 "advanced_editing_assessment_settings"
303 );
304 if (!$this->saveTags("assessment", "assessment", $form)) {
305 $form->setValuesByPost();
306 $this->tpl->setContent($form->getHTML());
307 }
308 }

References $form, initTagsForm(), and saveTags().

+ Here is the call graph for this function:

◆ saveCharSelectorSettingsObject()

ilObjAdvancedEditingGUI::saveCharSelectorSettingsObject ( )

Save the settings for the selector of unicode characters.

Definition at line 765 of file class.ilObjAdvancedEditingGUI.php.

766 {
771
772 $this->checkPermission("write");
773
774 require_once 'Services/UIComponent/CharSelector/classes/class.ilCharSelectorGUI.php';
776 $form = $this->initCharSelectorSettingsForm($char_selector);
777 if ($form->checkInput()) {
778 $char_selector->getFormValues($form);
779
780 $ilSetting->set('char_selector_availability', $char_selector->getConfig()->getAvailability());
781 $ilSetting->set('char_selector_definition', $char_selector->getConfig()->getDefinition());
782
783 ilUtil::sendSuccess($lng->txt("msg_obj_modified"), true);
784 $ilCtrl->redirect($this, "showCharSelectorSettings");
785 }
786 $form->setValuesByPost();
787 $tpl->setContent($form->getHTML());
788 }
This shows a character selector.
initCharSelectorSettingsForm(ilCharSelectorGUI $char_selector)
Init the settings form for the selector of unicode characters.
checkPermission($a_perm, $a_cmd="", $a_type="", $a_ref_id=null)
Check permission and redirect on error.

References ilObjectGUI\$ctrl, $form, $ilCtrl, $ilSetting, ilObjectGUI\$lng, $settings, ilObjectGUI\$tpl, ilObjectGUI\checkPermission(), ilCharSelectorConfig\CONTEXT_ADMIN, and initCharSelectorSettingsForm().

+ Here is the call graph for this function:

◆ saveExcAssSettingsObject()

ilObjAdvancedEditingGUI::saveExcAssSettingsObject ( )

Definition at line 381 of file class.ilObjAdvancedEditingGUI.php.

382 {
383 $form = $this->initTagsForm(
384 "exc_ass",
385 "saveExcAssSettings",
386 "advanced_editing_excass_settings"
387 );
388 if (!$this->saveTags("exc_ass", "excAss", $form)) {
389 $form->setValuesByPost();
390 $this->tpl->setContent($form->getHTML());
391 }
392 }

References $form, initTagsForm(), and saveTags().

+ Here is the call graph for this function:

◆ saveFrmPostSettingsObject()

ilObjAdvancedEditingGUI::saveFrmPostSettingsObject ( )

Definition at line 353 of file class.ilObjAdvancedEditingGUI.php.

354 {
355 $form = $this->initTagsForm(
356 "frm_post",
357 "saveFrmPostSettings",
358 "advanced_editing_frm_post_settings"
359 );
360 if (!$this->saveTags("frm_post", "frmPost", $form)) {
361 $form->setValuesByPost();
362 $this->tpl->setContent($form->getHTML());
363 }
364 }

References $form, initTagsForm(), and saveTags().

+ Here is the call graph for this function:

◆ saveGeneralPageSettingsObject()

ilObjAdvancedEditingGUI::saveGeneralPageSettingsObject ( )

Save general page settings.

Definition at line 686 of file class.ilObjAdvancedEditingGUI.php.

687 {
691
692 $this->checkPermission("write");
693
695 if ($form->checkInput()) {
696 $aset = new ilSetting("adve");
697 $aset->set("use_physical", $_POST["use_physical"]);
698 if ($_POST["block_mode_act"]) {
699 $aset->set("block_mode_minutes", (int) $_POST["block_mode_minutes"]);
700 } else {
701 $aset->set("block_mode_minutes", 0);
702 }
703 $aset->set("auto_url_linking", $_POST["auto_url_linking"]);
704
705 $def = new ilCOPageObjDef();
706 foreach ($def->getDefinitions() as $key => $def) {
707 if (in_array($key, $this->getPageObjectKeysWithOptionalHTML())) {
708 $aset->set("act_html_" . $key, (int) $_POST["act_html_" . $key]);
709 }
710 }
711
712 ilUtil::sendSuccess($lng->txt("msg_obj_modified"), true);
713 $ilCtrl->redirect($this, "showGeneralPageEditorSettings");
714 }
715
716 $form->setValuesByPost();
717 $tpl->setContent($form->getHTML());
718 }
$_POST["username"]
initGeneralPageSettingsForm()
Init general page editor settings form.

References $_POST, ilObjectGUI\$ctrl, $def, $form, $ilCtrl, $key, ilObjectGUI\$lng, ilObjectGUI\$tpl, ilObjectGUI\checkPermission(), getPageObjectKeysWithOptionalHTML(), and initGeneralPageSettingsForm().

+ Here is the call graph for this function:

◆ saveObject()

ilObjAdvancedEditingGUI::saveObject ( )

save object @access public

Reimplemented from ilObjectGUI.

Definition at line 103 of file class.ilObjAdvancedEditingGUI.php.

104 {
105 $this->checkPermission("write");
106
107 parent::saveObject();
108
109 // always send a message
110 ilUtil::sendSuccess($this->lng->txt("object_added"), true);
111 $this->ctrl->redirect($this);
112 }

References ilObjectGUI\checkPermission().

+ Here is the call graph for this function:

◆ savePageEditorSettingsObject()

ilObjAdvancedEditingGUI::savePageEditorSettingsObject ( )

Save page editor settings form.

Definition at line 542 of file class.ilObjAdvancedEditingGUI.php.

543 {
547
548 $this->checkPermission("write");
549
550 $this->initPageEditorForm();
551 if ($this->form->checkInput()) {
552 include_once("./Services/COPage/classes/class.ilPageEditorSettings.php");
553 include_once("./Services/COPage/classes/class.ilPageContentGUI.php");
555 foreach ($buttons as $b => $t) {
557 $_GET["grp"],
558 "active_" . $b,
559 $this->form->getInput("active_" . $b)
560 );
561 }
562
563 if ($_GET["grp"] == "test") {
564 $ilSetting->set("enable_tst_page_edit", (int) $_POST["tst_page_edit"]);
565 } elseif ($_GET["grp"] == "rep") {
566 $ilSetting->set("enable_cat_page_edit", (int) $_POST["cat_page_edit"]);
567 }
568
569 ilUtil::sendInfo($lng->txt("msg_obj_modified"), true);
570 }
571
572 $ilCtrl->setParameter($this, "grp", $_GET["grp"]);
573 $ilCtrl->redirect($this, "showPageEditorSettings");
574 }
initPageEditorForm($a_mode="edit")
Init page editor form.
static writeSetting($a_grp, $a_name, $a_value)
Write Setting.
static sendInfo($a_info="", $a_keep=false)
Send Info Message to Screen.

References $_GET, $_POST, ilObjectGUI\$ctrl, $ilCtrl, $ilSetting, ilObjectGUI\$lng, $settings, $t, ilPageContentGUI\_getCommonBBButtons(), ilObjectGUI\checkPermission(), initPageEditorForm(), ilUtil\sendInfo(), and ilPageEditorSettings\writeSetting().

+ Here is the call graph for this function:

◆ saveSettingsObject()

ilObjAdvancedEditingGUI::saveSettingsObject ( )

Save Assessment settings.

Definition at line 268 of file class.ilObjAdvancedEditingGUI.php.

269 {
270 $this->checkPermission("write");
271
272 if ($_POST["use_tiny"]) {
273 $this->object->setRichTextEditor("tinymce");
274 } else {
275 $this->object->setRichTextEditor("");
276 }
277 ilUtil::sendSuccess($this->lng->txt("msg_obj_modified"), true);
278
279 $this->ctrl->redirect($this, 'settings');
280 }

References $_POST, and ilObjectGUI\checkPermission().

+ Here is the call graph for this function:

◆ saveSurveySettingsObject()

ilObjAdvancedEditingGUI::saveSurveySettingsObject ( )

Definition at line 325 of file class.ilObjAdvancedEditingGUI.php.

326 {
327 $form = $this->initTagsForm(
328 "survey",
329 "saveSurveySettings",
330 "advanced_editing_survey_settings"
331 );
332 if (!$this->saveTags("survey", "survey", $form)) {
333 $form->setValuesByPost();
334 $this->tpl->setContent($form->getHTML());
335 }
336 }

References $form, initTagsForm(), and saveTags().

+ Here is the call graph for this function:

◆ saveTags()

ilObjAdvancedEditingGUI::saveTags (   $a_id,
  $a_cmd,
  $form 
)
protected

Definition at line 423 of file class.ilObjAdvancedEditingGUI.php.

424 {
425 $this->checkPermission("write");
426 try {
427 if ($form->checkInput()) {
428 // get rid of select all
429 if (is_array($_POST['html_tags']) && $_POST['html_tags'][0] == "") {
430 unset($_POST['html_tags'][0]);
431 }
432
433 $this->object->setUsedHTMLTags((array) $_POST['html_tags'], $a_id);
434 ilUtil::sendSuccess($this->lng->txt('msg_obj_modified'), true);
435 } else {
436 return false;
437 }
439 ilUtil::sendInfo($e->getMessage(), true);
440 }
441
442 $this->ctrl->redirect($this, $a_cmd);
443 return true;
444 }
Class for advanced editing exception handling in ILIAS.

References $_POST, $form, ilObjectGUI\checkPermission(), and ilUtil\sendInfo().

Referenced by saveAssessmentSettingsObject(), saveExcAssSettingsObject(), saveFrmPostSettingsObject(), and saveSurveySettingsObject().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ settingsObject()

ilObjAdvancedEditingGUI::settingsObject ( )

Display assessment folder settings form.

Definition at line 241 of file class.ilObjAdvancedEditingGUI.php.

242 {
246
247 $editor = $this->object->_getRichTextEditor();
248
249 include_once("Services/Form/classes/class.ilPropertyFormGUI.php");
250 $this->form = new ilPropertyFormGUI();
251 $this->form->setFormAction($ilCtrl->getFormAction($this));
252 $this->form->setTitle($lng->txt("adve_activation"));
253 $cb = new ilCheckboxInputGUI($this->lng->txt("adve_use_tiny_mce"), "use_tiny");
254 if ($editor == "tinymce") {
255 $cb->setChecked(true);
256 }
257 $this->form->addItem($cb);
258 if ($this->checkPermissionBool("write")) {
259 $this->form->addCommandButton("saveSettings", $lng->txt("save"));
260 }
261
262 $tpl->setContent($this->form->getHTML());
263 }
$editor

References ilObjectGUI\$ctrl, $editor, $ilCtrl, ilObjectGUI\$lng, ilObjectGUI\$tpl, and ilObjectGUI\checkPermissionBool().

+ Here is the call graph for this function:

◆ showCharSelectorSettingsObject()

ilObjAdvancedEditingGUI::showCharSelectorSettingsObject ( )

Show the settings for the selector of unicode characters.

Definition at line 744 of file class.ilObjAdvancedEditingGUI.php.

745 {
746 $ilTabs = $this->tabs;
749
750 $ilTabs->activateTab("adve_char_selector_settings");
751
752 require_once 'Services/UIComponent/CharSelector/classes/class.ilCharSelectorGUI.php';
754 $char_selector->getConfig()->setAvailability($ilSetting->get('char_selector_availability'));
755 $char_selector->getConfig()->setDefinition($ilSetting->get('char_selector_definition'));
756 $form = $this->initCharSelectorSettingsForm($char_selector);
757 $char_selector->setFormValues($form);
758 $tpl->setContent($form->getHTML());
759 }

References $form, $ilSetting, $settings, $tabs, ilObjectGUI\$tpl, ilCharSelectorConfig\CONTEXT_ADMIN, and initCharSelectorSettingsForm().

+ Here is the call graph for this function:

◆ showGeneralPageEditorSettingsObject()

ilObjAdvancedEditingGUI::showGeneralPageEditorSettingsObject ( )

Show general page editor settings.

Definition at line 580 of file class.ilObjAdvancedEditingGUI.php.

581 {
583 $ilTabs = $this->tabs;
584
585 $this->addPageEditorSettingsSubTabs();
586 $ilTabs->activateTab("adve_page_editor_settings");
587
589 $tpl->setContent($form->getHTML());
590 }

References $form, $tabs, ilObjectGUI\$tpl, and initGeneralPageSettingsForm().

+ Here is the call graph for this function:

◆ showPageEditorSettingsObject()

ilObjAdvancedEditingGUI::showPageEditorSettingsObject ( )

Show page editor settings.

Definition at line 450 of file class.ilObjAdvancedEditingGUI.php.

451 {
453 $ilTabs = $this->tabs;
455
456 $this->addPageEditorSettingsSubTabs();
457
458 include_once("./Services/COPage/classes/class.ilPageEditorSettings.php");
460
461 $this->cgrp = $_GET["grp"];
462 if ($this->cgrp == "") {
463 $this->cgrp = key($grps);
464 }
465
466 $ilCtrl->setParameter($this, "grp", $this->cgrp);
467 $ilTabs->setSubTabActive("adve_grp_" . $this->cgrp);
468
469 $this->initPageEditorForm();
470 $tpl->setContent($this->form->getHtml());
471 }

References $_GET, ilObjectGUI\$ctrl, $ilCtrl, $tabs, ilObjectGUI\$tpl, ilPageEditorSettings\getGroups(), and initPageEditorForm().

+ Here is the call graph for this function:

◆ surveyObject()

ilObjAdvancedEditingGUI::surveyObject ( )

Display settings for surveys.

Definition at line 314 of file class.ilObjAdvancedEditingGUI.php.

315 {
316 $form = $this->initTagsForm(
317 "survey",
318 "saveSurveySettings",
319 "advanced_editing_survey_settings"
320 );
321
322 $this->tpl->setContent($form->getHTML());
323 }

References $form, and initTagsForm().

+ Here is the call graph for this function:

Field Documentation

◆ $access

ilObjAdvancedEditingGUI::$access
protected

Definition at line 37 of file class.ilObjAdvancedEditingGUI.php.

Referenced by initTagsForm().

◆ $conditions

ilObjAdvancedEditingGUI::$conditions

Definition at line 44 of file class.ilObjAdvancedEditingGUI.php.

◆ $rbacadmin

ilObjAdvancedEditingGUI::$rbacadmin
protected

Definition at line 27 of file class.ilObjAdvancedEditingGUI.php.

◆ $rbacsystem

ilObjAdvancedEditingGUI::$rbacsystem
protected

Definition at line 22 of file class.ilObjAdvancedEditingGUI.php.

Referenced by __construct(), and getTabs().

◆ $settings

ilObjAdvancedEditingGUI::$settings
protected

◆ $tabs


The documentation for this class was generated from the following file: