ILIAS  release_5-4 Revision v5.4.26-12-gabc799a52e6
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 ()
 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
 Constructor @access public. More...
 
- 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

 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...
 
 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

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

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 51 of file class.ilObjSurveyAdministrationGUI.php.

52 {
53 global $DIC;
54
55 $this->lng = $DIC->language();
56 $this->tabs = $DIC->tabs();
57 $this->tpl = $DIC["tpl"];
58 $this->access = $DIC->access();
59 $this->ctrl = $DIC->ctrl();
60 $lng = $DIC->language();
61
62 $this->type = "svyf";
63 $lng->loadLanguageModule("survey");
64 parent::__construct($a_data, $a_id, $a_call_by_reference, false);
65 }
global $DIC
Definition: saml.php:7

References $DIC, and ilObjectGUI\$lng.

Member Function Documentation

◆ executeCommand()

ilObjSurveyAdministrationGUI::executeCommand ( )

execute command

Reimplemented from ilObjectGUI.

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

68 {
69 $ilTabs = $this->tabs;
70
71 $next_class = $this->ctrl->getNextClass($this);
72 $cmd = $this->ctrl->getCmd();
73 $this->prepareOutput();
74
75 switch ($next_class) {
76 case 'ilpermissiongui':
77 $ilTabs->activateTab("perm_settings");
78 include_once("Services/AccessControl/classes/class.ilPermissionGUI.php");
79 $perm_gui = new ilPermissionGUI($this);
80 $ret = &$this->ctrl->forwardCommand($perm_gui);
81 break;
82
83 case 'ilsettingstemplategui':
84 $ilTabs->activateTab("templates");
85 include_once("./Services/Administration/classes/class.ilSettingsTemplateGUI.php");
86 $set_tpl_gui = new ilSettingsTemplateGUI($this->getSettingsTemplateConfig());
87 $this->ctrl->forwardCommand($set_tpl_gui);
88 break;
89
90 default:
91 if ($cmd == "" || $cmd == "view") {
92 $cmd = "settings";
93 }
94 $cmd .= "Object";
95 $this->$cmd();
96
97 break;
98 }
99 return true;
100 }
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 226 of file class.ilObjSurveyAdministrationGUI.php.

227 {
228 $this->getTabs();
229 }

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 276 of file class.ilObjSurveyAdministrationGUI.php.

277 {
279
280 $lng->loadLanguageModule("survey");
281 include_once "Modules/Survey/classes/class.ilObjSurvey.php";
282
283 include_once("./Services/Administration/classes/class.ilSettingsTemplateConfig.php");
285
286 $config->addHidableTab("survey_question_editor", $lng->txt("survey_question_editor_settings_template"));
287 $config->addHidableTab("constraints", $lng->txt("constraints"));
288 $config->addHidableTab("invitation", $lng->txt("invitation"));
289 $config->addHidableTab("meta_data", $lng->txt("meta_data"));
290 $config->addHidableTab("export", $lng->txt("export"));
291
292 $config->addSetting(
293 "use_pool",
295 $lng->txt("survey_question_pool_usage"),
296 true,
297 0,
298 array(1 => $this->lng->txt("survey_question_pool_usage_active"),
299 0 => $this->lng->txt("survey_question_pool_usage_inactive"))
300 );
301
302
303 $config->addSetting(
304 "enabled_start_date",
306 $lng->txt("start_date"),
307 true
308 );
309
310 $config->addSetting(
311 "enabled_end_date",
313 $lng->txt("end_date"),
314 true
315 );
316
317 $config->addSetting(
318 "show_question_titles",
320 $lng->txt("svy_show_questiontitles"),
321 true
322 );
323
324
325 // #17585
326
327 $config->addSetting(
328 "acc_codes",
330 $lng->txt("survey_access_codes"),
331 true
332 );
333
334 $config->addSetting(
335 "evaluation_access",
337 $lng->txt("evaluation_access"),
338 true,
339 0,
340 array(ilObjSurvey::EVALUATION_ACCESS_OFF => $this->lng->txt("evaluation_access_off"),
341 ilObjSurvey::EVALUATION_ACCESS_ALL => $this->lng->txt("evaluation_access_all"),
342 ilObjSurvey::EVALUATION_ACCESS_PARTICIPANTS => $this->lng->txt("evaluation_access_participants"))
343 );
344
345 $config->addSetting(
346 "anonymization_options",
348 $lng->txt("survey_results_anonymization"),
349 true,
350 0,
351 array("statpers" => $this->lng->txt("survey_results_personalized"),
352 "statanon" => $this->lng->txt("survey_results_anonymized"))
353 );
354
355 /*
356 $config->addSetting(
357 "rte_switch",
358 ilSettingsTemplateConfig::SELECT,
359 $lng->txt("set_edit_mode"),
360 true,
361 0,
362 array(0 => $this->lng->txt("rte_editor_disabled"),
363 1 => $this->lng->txt("rte_editor_enabled"))
364 );
365 */
366
367 return $config;
368 }
const EVALUATION_ACCESS_PARTICIPANTS
const EVALUATION_ACCESS_ALL
const EVALUATION_ACCESS_OFF
Settings template config class.
$config
Definition: bootstrap.php:15

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 236 of file class.ilObjSurveyAdministrationGUI.php.

237 {
239
240 if ($this->checkPermissionBool("read")) {
241 $this->tabs_gui->addTab(
242 "settings",
243 $lng->txt("settings"),
244 $this->ctrl->getLinkTarget($this, "settings")
245 );
246
247 // #7927: special users are deprecated
248 /*
249 $tabs_gui->addTab("specialusers",
250 $lng->txt("specialusers"),
251 $this->ctrl->getLinkTarget($this, "specialusers"));
252 */
253
254 if ($this->checkPermissionBool("write")) {
255 $this->tabs_gui->addTab(
256 "templates",
257 $lng->txt("adm_settings_templates"),
258 $this->ctrl->getLinkTargetByClass("ilsettingstemplategui", "")
259 );
260 }
261 }
262 if ($this->checkPermissionBool("edit_permission")) {
263 $this->tabs_gui->addTab(
264 "perm_settings",
265 $lng->txt("perm_settings"),
266 $this->ctrl->getLinkTargetByClass('ilpermissiongui', "perm")
267 );
268 }
269 }
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 124 of file class.ilObjSurveyAdministrationGUI.php.

125 {
126 $ilAccess = $this->access;
129
130 $surveySetting = new ilSetting("survey");
131 $unlimited_invitation = array_key_exists("unlimited_invitation", $_GET) ? $_GET["unlimited_invitation"] : $surveySetting->get("unlimited_invitation");
132 $use_anonymous_id = array_key_exists("use_anonymous_id", $_GET) ? $_GET["use_anonymous_id"] : $surveySetting->get("use_anonymous_id");
133
134 include_once("./Services/Form/classes/class.ilPropertyFormGUI.php");
135 $form = new ilPropertyFormGUI();
136 $form->setFormAction($ilCtrl->getFormAction($this));
137 $form->setTitle($lng->txt("survey_defaults"));
138
139 // unlimited invitation
140 $enable = new ilCheckboxInputGUI($lng->txt("survey_unlimited_invitation"), "unlimited_invitation");
141 $enable->setChecked($unlimited_invitation);
142 $enable->setInfo($lng->txt("survey_unlimited_invitation_desc"));
143 $form->addItem($enable);
144
145 // Survey Code
146 $code = new ilCheckboxInputGUI($lng->txt("use_anonymous_id"), "use_anonymous_id");
147 $code->setChecked($use_anonymous_id);
148 $code->setInfo($lng->txt("use_anonymous_id_desc"));
149 $form->addItem($code);
150
151 // Skipped
152 $eval_skipped = new ilRadioGroupInputGUI($lng->txt("svy_eval_skipped_value"), "skcust");
153 $eval_skipped->setRequired(true);
154 $form->addItem($eval_skipped);
155
156 $eval_skipped->setValue($surveySetting->get("skipped_is_custom", false)
157 ? "cust"
158 : "lng");
159
160 $skipped_lng = new ilRadioOption($lng->txt("svy_eval_skipped_value_lng"), "lng");
161 $skipped_lng->setInfo(sprintf($lng->txt("svy_eval_skipped_value_lng_info"), $lng->txt("skipped")));
162 $eval_skipped->addOption($skipped_lng);
163 $skipped_cust = new ilRadioOption($lng->txt("svy_eval_skipped_value_custom"), "cust");
164 $skipped_cust->setInfo($lng->txt("svy_eval_skipped_value_custom_info"));
165 $eval_skipped->addOption($skipped_cust);
166
167 $skipped_cust_value = new ilTextInputGUI($lng->txt("svy_eval_skipped_value_custom_value"), "cust_value");
168 $skipped_cust_value->setSize(15);
169 $skipped_cust_value->setValue($surveySetting->get("skipped_custom_value", ""));
170 $skipped_cust->addSubItem($skipped_cust_value);
171
172 $anon_part = new ilCheckboxInputGUI($lng->txt("svy_anonymous_participants"), "anon_part");
173 $anon_part->setInfo($lng->txt("svy_anonymous_participants_info"));
174 $anon_part->setChecked($surveySetting->get("anonymous_participants", false));
175 $form->addItem($anon_part);
176
177 $anon_part_min = new ilNumberInputGUI($lng->txt("svy_anonymous_participants_min"), "anon_part_min");
178 $anon_part_min->setInfo($lng->txt("svy_anonymous_participants_min_info"));
179 $anon_part_min->setSize(4);
180 $anon_part_min->setMinValue(1);
181 $anon_part_min->setValue($surveySetting->get("anonymous_participants_min", null));
182 $anon_part->addSubItem($anon_part_min);
183
184 if ($ilAccess->checkAccess("write", "", $this->object->getRefId())) {
185 $form->addCommandButton("saveSettings", $lng->txt("save"));
186 }
187
188 return $form;
189 }
$_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.
$code
Definition: example_050.php:99
global $ilCtrl
Definition: ilias.php:18
if(isset($_POST['submit'])) $form

References $_GET, ilObjectGUI\$access, $code, ilObjectGUI\$ctrl, $form, $ilCtrl, 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 194 of file class.ilObjSurveyAdministrationGUI.php.

195 {
197 $ilAccess = $this->access;
198
199 if (!$ilAccess->checkAccess("write", "", $this->object->getRefId())) {
200 $ilCtrl->redirect($this, "settings");
201 }
202
203 $form = $this->initSettingsForm();
204 if ($form->checkInput()) {
205 $surveySetting = new ilSetting("survey");
206 $surveySetting->set("unlimited_invitation", ($_POST["unlimited_invitation"]) ? "1" : "0");
207 $surveySetting->set("use_anonymous_id", ($_POST["use_anonymous_id"]) ? "1" : "0");
208 $surveySetting->set("anonymous_participants", ($_POST["anon_part"]) ? "1" : "0");
209 $surveySetting->set("anonymous_participants_min", (trim($_POST["anon_part_min"])) ? (int) $_POST["anon_part_min"] : null);
210
211 if ($_POST["skcust"] == "lng") {
212 $surveySetting->set("skipped_is_custom", false);
213 } else {
214 $surveySetting->set("skipped_is_custom", true);
215 $surveySetting->set("skipped_custom_value", trim($_POST["cust_value"]));
216 }
217
218 ilUtil::sendSuccess($this->lng->txt("msg_obj_modified"), true);
219 $ilCtrl->redirect($this, "settings");
220 }
221
222 $form->setValuesByPost();
223 $this->settingsObject($form);
224 }
$_POST["username"]
settingsObject(ilPropertyFormGUI $a_form=null)
display survey settings form

References $_POST, ilObjectGUI\$access, ilObjectGUI\$ctrl, $form, $ilCtrl, 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 110 of file class.ilObjSurveyAdministrationGUI.php.

111 {
113 $ilTabs = $this->tabs;
114
115 $ilTabs->activateTab("settings");
116
117 if (!$a_form) {
118 $a_form = $this->initSettingsForm();
119 }
120
121 $tpl->setContent($a_form->getHTML());
122 }

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 49 of file class.ilObjSurveyAdministrationGUI.php.

◆ $tabs

ilObjSurveyAdministrationGUI::$tabs
protected

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

Referenced by executeCommand(), and settingsObject().


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