24 include_once
"./Services/Object/classes/class.ilObjectGUI.php";
51 $lng->loadLanguageModule(
"survey");
52 parent::__construct($a_data,$a_id,$a_call_by_reference,
false);
59 $next_class = $this->ctrl->getNextClass($this);
60 $cmd = $this->ctrl->getCmd();
65 case 'ilpermissiongui':
66 $ilTabs->activateTab(
"perm_settings");
67 include_once(
"Services/AccessControl/classes/class.ilPermissionGUI.php");
69 $ret =& $this->ctrl->forwardCommand($perm_gui);
72 case 'ilsettingstemplategui':
73 $ilTabs->activateTab(
"templates");
74 include_once(
"./Services/Administration/classes/class.ilSettingsTemplateGUI.php");
76 $this->ctrl->forwardCommand($set_tpl_gui);
102 global
$tpl, $ilTabs;
104 $ilTabs->activateTab(
"settings");
111 $tpl->setContent($a_form->getHTML());
118 $surveySetting =
new ilSetting(
"survey");
119 $unlimited_invitation = array_key_exists(
"unlimited_invitation",
$_GET) ?
$_GET[
"unlimited_invitation"] : $surveySetting->get(
"unlimited_invitation");
120 $use_anonymous_id = array_key_exists(
"use_anonymous_id",
$_GET) ?
$_GET[
"use_anonymous_id"] : $surveySetting->get(
"use_anonymous_id");
122 include_once(
"./Services/Form/classes/class.ilPropertyFormGUI.php");
124 $form->setFormAction($ilCtrl->getFormAction($this));
125 $form->setTitle($lng->txt(
"survey_defaults"));
128 $enable =
new ilCheckboxInputGUI($lng->txt(
"survey_unlimited_invitation"),
"unlimited_invitation");
130 $enable->setInfo($lng->txt(
"survey_unlimited_invitation_desc"));
131 $form->addItem($enable);
135 $code->setChecked($use_anonymous_id);
136 $code->setInfo($lng->txt(
"use_anonymous_id_desc"));
137 $form->addItem(
$code);
142 $form->addItem($eval_skipped);
144 $eval_skipped->setValue($surveySetting->get(
"skipped_is_custom",
false)
148 $skipped_lng =
new ilRadioOption($lng->txt(
"svy_eval_skipped_value_lng"),
"lng");
149 $skipped_lng->
setInfo(sprintf($lng->txt(
"svy_eval_skipped_value_lng_info"), $lng->txt(
"skipped")));
150 $eval_skipped->addOption($skipped_lng);
151 $skipped_cust =
new ilRadioOption($lng->txt(
"svy_eval_skipped_value_custom"),
"cust");
152 $skipped_cust->
setInfo($lng->txt(
"svy_eval_skipped_value_custom_info"));
153 $eval_skipped->addOption($skipped_cust);
155 $skipped_cust_value =
new ilTextInputGUI($lng->txt(
"svy_eval_skipped_value_custom_value"),
"cust_value");
156 $skipped_cust_value->
setSize(15);
157 $skipped_cust_value->setValue($surveySetting->get(
"skipped_custom_value",
""));
158 $skipped_cust->addSubItem($skipped_cust_value);
160 $anon_part =
new ilCheckboxInputGUI($lng->txt(
"svy_anonymous_participants"),
"anon_part");
161 $anon_part->
setInfo($lng->txt(
"svy_anonymous_participants_info"));
162 $anon_part->setChecked($surveySetting->get(
"anonymous_participants",
false));
163 $form->addItem($anon_part);
165 $anon_part_min =
new ilNumberInputGUI($lng->txt(
"svy_anonymous_participants_min"),
"anon_part_min");
166 $anon_part_min->
setInfo($lng->txt(
"svy_anonymous_participants_min_info"));
167 $anon_part_min->setSize(4);
168 $anon_part_min->setMinValue(1);
169 $anon_part_min->setValue($surveySetting->get(
"anonymous_participants_min", null));
170 $anon_part->addSubItem($anon_part_min);
172 if ($ilAccess->checkAccess(
"write",
"", $this->object->getRefId()))
174 $form->addCommandButton(
"saveSettings", $lng->txt(
"save"));
187 if (!$ilAccess->checkAccess(
"write",
"", $this->object->getRefId()))
189 $ilCtrl->redirect($this,
"settings");
193 if($form->checkInput())
195 $surveySetting =
new ilSetting(
"survey");
196 $surveySetting->set(
"unlimited_invitation", (
$_POST[
"unlimited_invitation"]) ?
"1" :
"0");
197 $surveySetting->set(
"use_anonymous_id", (
$_POST[
"use_anonymous_id"]) ?
"1" :
"0");
198 $surveySetting->set(
"anonymous_participants", (
$_POST[
"anon_part"]) ?
"1" :
"0");
199 $surveySetting->set(
"anonymous_participants_min", (trim(
$_POST[
"anon_part_min"])) ? (
int)
$_POST[
"anon_part_min"] : null);
201 if(
$_POST[
"skcust"] ==
"lng")
203 $surveySetting->set(
"skipped_is_custom",
false);
207 $surveySetting->set(
"skipped_is_custom",
true);
208 $surveySetting->set(
"skipped_custom_value", trim(
$_POST[
"cust_value"]));
212 $ilCtrl->redirect($this,
"settings");
215 $form->setValuesByPost();
235 $this->tabs_gui->addTab(
"settings",
236 $lng->txt(
"settings"),
237 $this->ctrl->getLinkTarget($this,
"settings"));
248 $this->tabs_gui->addTab(
"templates",
249 $lng->txt(
"adm_settings_templates"),
250 $this->ctrl->getLinkTargetByClass(
"ilsettingstemplategui",
""));
255 $this->tabs_gui->addTab(
"perm_settings",
256 $lng->txt(
"perm_settings"),
257 $this->ctrl->getLinkTargetByClass(
'ilpermissiongui',
"perm"));
270 $lng->loadLanguageModule(
"survey");
271 include_once
"Modules/Survey/classes/class.ilObjSurvey.php";
273 include_once(
"./Services/Administration/classes/class.ilSettingsTemplateConfig.php");
276 $config->addHidableTab(
"survey_question_editor", $lng->txt(
"survey_question_editor_settings_template"));
277 $config->addHidableTab(
"constraints", $lng->txt(
"constraints"));
278 $config->addHidableTab(
"invitation", $lng->txt(
"invitation"));
279 $config->addHidableTab(
"meta_data", $lng->txt(
"meta_data"));
280 $config->addHidableTab(
"export", $lng->txt(
"export"));
285 $lng->txt(
"survey_question_pool_usage"),
288 array(1 => $this->lng->txt(
"survey_question_pool_usage_active"),
289 0 => $this->lng->txt(
"survey_question_pool_usage_inactive"))
294 "enabled_start_date",
296 $lng->txt(
"start_date"),
303 $lng->txt(
"end_date"),
308 "show_question_titles",
310 $lng->txt(
"svy_show_questiontitles"),
320 $lng->txt(
"survey_access_codes"),
327 $lng->txt(
"evaluation_access"),
336 "anonymization_options",
338 $lng->txt(
"survey_results_anonymization"),
341 array(
"statpers" => $this->lng->txt(
"survey_results_personalized"),
342 "statanon" => $this->lng->txt(
"survey_results_anonymized"))
static sendSuccess($a_info="", $a_keep=false)
Send Success Message to Screen.
This class represents an option in a radio group.
getSettingsTemplateConfig()
Get settings template configuration object.
saveSettingsObject()
Save survey settings.
const EVALUATION_ACCESS_OFF
const EVALUATION_ACCESS_PARTICIPANTS
setInfo($a_info)
Set Info.
prepareOutput($a_show_subobjects=true)
prepare output
Class ilObjectGUI Basic methods of all Output classes.
setSize($a_size)
Set Size.
This class represents a text property in a property form.
Create styles array
The data for the language used.
Settings template config class.
const EVALUATION_ACCESS_ALL
New PermissionGUI (extends from old ilPermission2GUI) RBAC related output.
settingsObject(ilPropertyFormGUI $a_form=null)
display survey settings form
checkPermissionBool($a_perm, $a_cmd="", $a_type="", $a_ref_id=null)
Check permission.
$conditions
Constructor public.
Class ilObjSurveyAdministrationGUI.
__construct($a_data, $a_id, $a_call_by_reference)