ILIAS  release_7 Revision v7.30-3-g800a261c036
ilObjSurveyAdministrationGUI Class Reference

Class ilObjSurveyAdministrationGUI. More...

+ Inheritance diagram for ilObjSurveyAdministrationGUI:
+ Collaboration diagram for ilObjSurveyAdministrationGUI:

Public Member Functions

 __construct ($a_data, $a_id, $a_call_by_reference)
 
 executeCommand ()
 execute command More...
 
 settingsObject (ilPropertyFormGUI $a_form=null)
 display survey settings form More...
 
 saveSettingsObject ()
 Save survey settings. More...
 
 getAdminTabs ()
 administration tabs show only permissions and trash folder More...
 
 getTabs ()
 get tabs @access public 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 ()
 viewObject container presentation for "administration -> repository, trash, permissions" 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...
 
 addToDeskObject ()
 @inheritDoc More...
 
 removeFromDeskObject ()
 @inheritDoc More...
 
- Public Member Functions inherited from ILIAS\Object\ImplementsCreationCallback
 callCreationCallback (\ilObject $object, \ilObjectDefinition $obj_definition, int $requested_crtcb)
 

Data Fields

 $conditions
 Constructor @access public. More...
 
- Data Fields inherited from ilObjectGUI
const ALLOWED_TAGS_IN_TITLE_AND_DESCRIPTION
 
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

 initSettingsForm ()
 
- 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...
 
 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

 $tabs
 
- Protected Attributes inherited from ilObjectGUI
const UPLOAD_TYPE_LOCAL = 1
 
const UPLOAD_TYPE_UPLOAD_DIRECTORY = 2
 
 $ilErr
 
 $locator
 
 $user
 
 $access
 
 $rbacsystem
 
 $settings
 
 $rbacreview
 
 $toolbar
 
 $tmp_import_dir
 
 $tabs_gui = null
 
 $ctrl
 
 $object_service
 
 $favourites
 
 $request
 

Private Member Functions

 getSettingsTemplateConfig ()
 Get settings template configuration object. More...
 

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

Constructor & Destructor Documentation

◆ __construct()

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

Definition at line 25 of file class.ilObjSurveyAdministrationGUI.php.

26 {
27 global $DIC;
28
29 $this->lng = $DIC->language();
30 $this->tabs = $DIC->tabs();
31 $this->tpl = $DIC["tpl"];
32 $this->access = $DIC->access();
33 $this->ctrl = $DIC->ctrl();
34 $lng = $DIC->language();
35
36 $this->type = "svyf";
37 $lng->loadLanguageModule("survey");
38 parent::__construct($a_data, $a_id, $a_call_by_reference, false);
39 }
global $DIC
Definition: goto.php:24
__construct(Container $dic, ilPlugin $plugin)
@inheritDoc

References $DIC, ilObjectGUI\$lng, and ILIAS\GlobalScreen\Provider\__construct().

+ Here is the call graph for this function:

Member Function Documentation

◆ executeCommand()

ilObjSurveyAdministrationGUI::executeCommand ( )

execute command

Reimplemented from ilObjectGUI.

Definition at line 41 of file class.ilObjSurveyAdministrationGUI.php.

42 {
43 $ilTabs = $this->tabs;
44
45 $next_class = $this->ctrl->getNextClass($this);
46 $cmd = $this->ctrl->getCmd();
47 $this->prepareOutput();
48
49 switch ($next_class) {
50 case 'ilpermissiongui':
51 $ilTabs->activateTab("perm_settings");
52 $perm_gui = new ilPermissionGUI($this);
53 $ret = &$this->ctrl->forwardCommand($perm_gui);
54 break;
55
56 case 'ilsettingstemplategui':
57 $ilTabs->activateTab("templates");
58 $set_tpl_gui = new ilSettingsTemplateGUI($this->getSettingsTemplateConfig());
59 $this->ctrl->forwardCommand($set_tpl_gui);
60 break;
61
62 default:
63 if ($cmd == "" || $cmd == "view") {
64 $cmd = "settings";
65 }
66 $cmd .= "Object";
67 $this->$cmd();
68
69 break;
70 }
71 return true;
72 }
getSettingsTemplateConfig()
Get settings template configuration object.
prepareOutput($a_show_subobjects=true)
prepare output
New PermissionGUI (extends from old ilPermission2GUI) RBAC related output.
$ret
Definition: parser.php:6

References $ret, $tabs, getSettingsTemplateConfig(), and ilObjectGUI\prepareOutput().

+ Here is the call graph for this function:

◆ getAdminTabs()

ilObjSurveyAdministrationGUI::getAdminTabs ( )

administration tabs show only permissions and trash folder

Reimplemented from ilObjectGUI.

Definition at line 198 of file class.ilObjSurveyAdministrationGUI.php.

199 {
200 $this->getTabs();
201 }

References getTabs().

+ Here is the call graph for this function:

◆ getSettingsTemplateConfig()

ilObjSurveyAdministrationGUI::getSettingsTemplateConfig ( )
private

Get settings template configuration object.

Returns
object settings template configuration object

Definition at line 246 of file class.ilObjSurveyAdministrationGUI.php.

247 {
249
250 $lng->loadLanguageModule("survey");
251
253
254 $config->addHidableTab("survey_question_editor", $lng->txt("survey_question_editor_settings_template"));
255 $config->addHidableTab("constraints", $lng->txt("constraints"));
256 //$config->addHidableTab("invitation", $lng->txt("invitation"));
257 $config->addHidableTab("meta_data", $lng->txt("meta_data"));
258 $config->addHidableTab("export", $lng->txt("export"));
259
260 $config->addSetting(
261 "use_pool",
263 $lng->txt("survey_question_pool_usage"),
264 true,
265 0,
266 array(1 => $this->lng->txt("survey_question_pool_usage_active"),
267 0 => $this->lng->txt("survey_question_pool_usage_inactive"))
268 );
269
270
271 $config->addSetting(
272 "enabled_start_date",
274 $lng->txt("start_date"),
275 true
276 );
277
278 $config->addSetting(
279 "enabled_end_date",
281 $lng->txt("end_date"),
282 true
283 );
284
285 $config->addSetting(
286 "show_question_titles",
288 $lng->txt("svy_show_questiontitles"),
289 true
290 );
291
292
293 // #17585
294
295 $config->addSetting(
296 "acc_codes",
298 $lng->txt("survey_access_codes"),
299 true
300 );
301
302 $config->addSetting(
303 "evaluation_access",
305 $lng->txt("evaluation_access"),
306 true,
307 0,
308 array(ilObjSurvey::EVALUATION_ACCESS_OFF => $this->lng->txt("evaluation_access_off"),
309 ilObjSurvey::EVALUATION_ACCESS_ALL => $this->lng->txt("evaluation_access_all"),
310 ilObjSurvey::EVALUATION_ACCESS_PARTICIPANTS => $this->lng->txt("evaluation_access_participants"))
311 );
312
313 $config->addSetting(
314 "anonymization_options",
316 $lng->txt("survey_results_anonymization"),
317 true,
318 0,
319 array("statpers" => $this->lng->txt("survey_results_personalized"),
320 "statanon" => $this->lng->txt("survey_results_anonymized"))
321 );
322
323 /*
324 $config->addSetting(
325 "rte_switch",
326 ilSettingsTemplateConfig::SELECT,
327 $lng->txt("set_edit_mode"),
328 true,
329 0,
330 array(0 => $this->lng->txt("rte_editor_disabled"),
331 1 => $this->lng->txt("rte_editor_enabled"))
332 );
333 */
334
335 return $config;
336 }
const EVALUATION_ACCESS_PARTICIPANTS
const EVALUATION_ACCESS_ALL
const EVALUATION_ACCESS_OFF
Settings template config class.
if(!array_key_exists('PATH_INFO', $_SERVER)) $config
Definition: metadata.php:68

References $config, ilObjectGUI\$lng, ilSettingsTemplateConfig\BOOL, ilObjSurvey\EVALUATION_ACCESS_ALL, ilObjSurvey\EVALUATION_ACCESS_OFF, ilObjSurvey\EVALUATION_ACCESS_PARTICIPANTS, and ilSettingsTemplateConfig\SELECT.

Referenced by executeCommand().

+ Here is the caller graph for this function:

◆ getTabs()

ilObjSurveyAdministrationGUI::getTabs ( )

get tabs @access public

Parameters
objecttabs gui object

Reimplemented from ilObjectGUI.

Definition at line 208 of file class.ilObjSurveyAdministrationGUI.php.

209 {
211
212 if ($this->rbacsystem->checkAccess("visible,read", $this->object->getRefId())) {
213 $this->tabs_gui->addTab(
214 "settings",
215 $lng->txt("settings"),
216 $this->ctrl->getLinkTarget($this, "settings")
217 );
218
219 // #7927: special users are deprecated
220 /*
221 $tabs_gui->addTab("specialusers",
222 $lng->txt("specialusers"),
223 $this->ctrl->getLinkTarget($this, "specialusers"));
224 */
225
226 $this->tabs_gui->addTab(
227 "templates",
228 $lng->txt("adm_settings_templates"),
229 $this->ctrl->getLinkTargetByClass("ilsettingstemplategui", "")
230 );
231 }
232 if ($this->checkPermissionBool("edit_permission")) {
233 $this->tabs_gui->addTab(
234 "perm_settings",
235 $lng->txt("perm_settings"),
236 $this->ctrl->getLinkTargetByClass('ilpermissiongui', "perm")
237 );
238 }
239 }
checkPermissionBool($a_perm, $a_cmd="", $a_type="", $a_ref_id=null)
Check permission.

References ilObjectGUI\$lng, and ilObjectGUI\checkPermissionBool().

Referenced by getAdminTabs().

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

◆ initSettingsForm()

ilObjSurveyAdministrationGUI::initSettingsForm ( )
protected

Definition at line 96 of file class.ilObjSurveyAdministrationGUI.php.

97 {
98 $ilAccess = $this->access;
100 $ilCtrl = $this->ctrl;
101
102 $surveySetting = new ilSetting("survey");
103 $unlimited_invitation = array_key_exists("unlimited_invitation", $_GET) ? $_GET["unlimited_invitation"] : $surveySetting->get("unlimited_invitation");
104 $use_anonymous_id = array_key_exists("use_anonymous_id", $_GET) ? $_GET["use_anonymous_id"] : $surveySetting->get("use_anonymous_id");
105
106 $form = new ilPropertyFormGUI();
107 $form->setFormAction($ilCtrl->getFormAction($this));
108 $form->setTitle($lng->txt("survey_defaults"));
109
110 // unlimited invitation
111 /*
112 $enable = new ilCheckboxInputGUI($lng->txt("survey_unlimited_invitation"), "unlimited_invitation");
113 $enable->setChecked($unlimited_invitation);
114 $enable->setInfo($lng->txt("survey_unlimited_invitation_desc"));
115 $form->addItem($enable);*/
116
117 // Survey Code
118 $code = new ilCheckboxInputGUI($lng->txt("use_anonymous_id"), "use_anonymous_id");
119 $code->setChecked($use_anonymous_id);
120 $code->setInfo($lng->txt("use_anonymous_id_desc"));
121 $form->addItem($code);
122
123 // Skipped
124 $eval_skipped = new ilRadioGroupInputGUI($lng->txt("svy_eval_skipped_value"), "skcust");
125 $eval_skipped->setRequired(true);
126 $form->addItem($eval_skipped);
127
128 $eval_skipped->setValue($surveySetting->get("skipped_is_custom", false)
129 ? "cust"
130 : "lng");
131
132 $skipped_lng = new ilRadioOption($lng->txt("svy_eval_skipped_value_lng"), "lng");
133 $skipped_lng->setInfo(sprintf($lng->txt("svy_eval_skipped_value_lng_info"), $lng->txt("skipped")));
134 $eval_skipped->addOption($skipped_lng);
135 $skipped_cust = new ilRadioOption($lng->txt("svy_eval_skipped_value_custom"), "cust");
136 $skipped_cust->setInfo($lng->txt("svy_eval_skipped_value_custom_info"));
137 $eval_skipped->addOption($skipped_cust);
138
139 $skipped_cust_value = new ilTextInputGUI($lng->txt("svy_eval_skipped_value_custom_value"), "cust_value");
140 $skipped_cust_value->setSize(15);
141 $skipped_cust_value->setValue($surveySetting->get("skipped_custom_value", ""));
142 $skipped_cust->addSubItem($skipped_cust_value);
143
144 $anon_part = new ilCheckboxInputGUI($lng->txt("svy_anonymous_participants"), "anon_part");
145 $anon_part->setInfo($lng->txt("svy_anonymous_participants_info"));
146 $anon_part->setChecked($surveySetting->get("anonymous_participants", false));
147 $form->addItem($anon_part);
148
149 $anon_part_min = new ilNumberInputGUI($lng->txt("svy_anonymous_participants_min"), "anon_part_min");
150 $anon_part_min->setInfo($lng->txt("svy_anonymous_participants_min_info"));
151 $anon_part_min->setSize(4);
152 $anon_part_min->setMinValue(1);
153 $anon_part_min->setValue($surveySetting->get("anonymous_participants_min", null));
154 $anon_part->addSubItem($anon_part_min);
155
156 if ($ilAccess->checkAccess("write", "", $this->object->getRefId())) {
157 $form->addCommandButton("saveSettings", $lng->txt("save"));
158 }
159
160 return $form;
161 }
$_GET["client_id"]
This class represents a checkbox property in a property form.
This class represents a number property in a property form.
This class represents a property form user interface.
This class represents a property in a property form.
This class represents an option in a radio group.
ILIAS Setting Class.
This class represents a text property in a property form.

References $_GET, ilObjectGUI\$access, ilObjectGUI\$ctrl, and ilObjectGUI\$lng.

Referenced by saveSettingsObject(), and settingsObject().

+ Here is the caller graph for this function:

◆ saveSettingsObject()

ilObjSurveyAdministrationGUI::saveSettingsObject ( )

Save survey settings.

Definition at line 166 of file class.ilObjSurveyAdministrationGUI.php.

167 {
168 $ilCtrl = $this->ctrl;
169 $ilAccess = $this->access;
170
171 if (!$ilAccess->checkAccess("write", "", $this->object->getRefId())) {
172 $ilCtrl->redirect($this, "settings");
173 }
174
175 $form = $this->initSettingsForm();
176 if ($form->checkInput()) {
177 $surveySetting = new ilSetting("survey");
178 //$surveySetting->set("unlimited_invitation", ($_POST["unlimited_invitation"]) ? "1" : "0");
179 $surveySetting->set("use_anonymous_id", ($_POST["use_anonymous_id"]) ? "1" : "0");
180 $surveySetting->set("anonymous_participants", ($_POST["anon_part"]) ? "1" : "0");
181 $surveySetting->set("anonymous_participants_min", (trim($_POST["anon_part_min"])) ? (int) $_POST["anon_part_min"] : null);
182
183 if ($_POST["skcust"] == "lng") {
184 $surveySetting->set("skipped_is_custom", false);
185 } else {
186 $surveySetting->set("skipped_is_custom", true);
187 $surveySetting->set("skipped_custom_value", trim($_POST["cust_value"]));
188 }
189
190 ilUtil::sendSuccess($this->lng->txt("msg_obj_modified"), true);
191 $ilCtrl->redirect($this, "settings");
192 }
193
194 $form->setValuesByPost();
195 $this->settingsObject($form);
196 }
$_POST["username"]
settingsObject(ilPropertyFormGUI $a_form=null)
display survey settings form

References $_POST, ilObjectGUI\$access, ilObjectGUI\$ctrl, initSettingsForm(), and settingsObject().

+ Here is the call graph for this function:

◆ settingsObject()

ilObjSurveyAdministrationGUI::settingsObject ( ilPropertyFormGUI  $a_form = null)

display survey settings form

Default settings tab for Survey settings

@access public

Definition at line 82 of file class.ilObjSurveyAdministrationGUI.php.

83 {
85 $ilTabs = $this->tabs;
86
87 $ilTabs->activateTab("settings");
88
89 if (!$a_form) {
90 $a_form = $this->initSettingsForm();
91 }
92
93 $tpl->setContent($a_form->getHTML());
94 }

References $tabs, ilObjectGUI\$tpl, and initSettingsForm().

Referenced by saveSettingsObject().

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

Field Documentation

◆ $conditions

ilObjSurveyAdministrationGUI::$conditions

Constructor @access public.

Definition at line 23 of file class.ilObjSurveyAdministrationGUI.php.

◆ $tabs

ilObjSurveyAdministrationGUI::$tabs
protected

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

Referenced by executeCommand(), and settingsObject().


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