30 bool $a_call_by_reference
34 $this->
lng = $DIC->language();
35 $this->
tabs = $DIC->tabs();
36 $this->tpl =
$DIC[
"tpl"];
37 $this->
access = $DIC->access();
38 $this->
ctrl = $DIC->ctrl();
50 $next_class = $this->
ctrl->getNextClass($this);
51 $cmd = $this->
ctrl->getCmd();
54 switch ($next_class) {
55 case 'ilpermissiongui':
56 $ilTabs->activateTab(
"perm_settings");
58 $this->
ctrl->forwardCommand($perm_gui);
62 if ($cmd ===
null || $cmd ===
"" || $cmd ===
"view") {
91 $ilAccess = $this->access;
93 $ilCtrl = $this->ctrl;
96 $use_anonymous_id = (bool) $surveySetting->get(
"use_anonymous_id");
99 $form->setFormAction($ilCtrl->getFormAction($this));
100 $form->setTitle(
$lng->txt(
"survey_defaults"));
104 $code->setChecked($use_anonymous_id);
105 $code->setInfo(
$lng->txt(
"use_anonymous_id_desc"));
106 $form->addItem($code);
110 $eval_skipped->setRequired(
true);
111 $form->addItem($eval_skipped);
113 $eval_skipped->setValue($surveySetting->get(
"skipped_is_custom",
false)
117 $skipped_lng =
new ilRadioOption(
$lng->txt(
"svy_eval_skipped_value_lng"),
"lng");
118 $skipped_lng->setInfo(sprintf(
$lng->txt(
"svy_eval_skipped_value_lng_info"),
$lng->txt(
"skipped")));
119 $eval_skipped->addOption($skipped_lng);
120 $skipped_cust =
new ilRadioOption(
$lng->txt(
"svy_eval_skipped_value_custom"),
"cust");
121 $skipped_cust->setInfo(
$lng->txt(
"svy_eval_skipped_value_custom_info"));
122 $eval_skipped->addOption($skipped_cust);
124 $skipped_cust_value =
new ilTextInputGUI(
$lng->txt(
"svy_eval_skipped_value_custom_value"),
"cust_value");
125 $skipped_cust_value->setSize(15);
126 $skipped_cust_value->setValue($surveySetting->get(
"skipped_custom_value",
""));
127 $skipped_cust->addSubItem($skipped_cust_value);
130 $anon_part->setInfo(
$lng->txt(
"svy_anonymous_participants_info"));
131 $anon_part->setChecked((
bool) $surveySetting->get(
"anonymous_participants",
'0'));
132 $form->addItem($anon_part);
134 $anon_part_min =
new ilNumberInputGUI(
$lng->txt(
"svy_anonymous_participants_min"),
"anon_part_min");
135 $anon_part_min->setInfo(
$lng->txt(
"svy_anonymous_participants_min_info"));
136 $anon_part_min->setSize(4);
137 $anon_part_min->setMinValue(1);
138 $anon_part_min->setValue($surveySetting->get(
"anonymous_participants_min",
null));
139 $anon_part->addSubItem($anon_part_min);
141 if ($ilAccess->checkAccess(
"write",
"", $this->object->getRefId())) {
142 $form->addCommandButton(
"saveSettings",
$lng->txt(
"save"));
150 $ilCtrl = $this->ctrl;
151 $ilAccess = $this->access;
153 if (!$ilAccess->checkAccess(
"write",
"", $this->object->getRefId())) {
154 $ilCtrl->redirect($this,
"settings");
157 $form = $this->initSettingsForm();
158 if ($form->checkInput()) {
159 $surveySetting =
new ilSetting(
"survey");
160 $surveySetting->set(
"use_anonymous_id", $form->getInput(
"use_anonymous_id") ?
"1" :
"0");
161 $surveySetting->set(
"anonymous_participants", $form->getInput(
"anon_part") ?
"1" :
"0");
163 "anonymous_participants_min",
164 (trim($form->getInput(
"anon_part_min") ??
""))
165 ? (
string) (
int) $form->getInput(
"anon_part_min")
169 if ($form->getInput(
"skcust") ===
"lng") {
170 $surveySetting->set(
"skipped_is_custom",
false);
172 $surveySetting->set(
"skipped_is_custom",
true);
173 $surveySetting->set(
"skipped_custom_value", trim($form->getInput(
"cust_value")));
176 $this->tpl->setOnScreenMessage(
'success', $this->
lng->txt(
"msg_obj_modified"),
true);
177 $ilCtrl->redirect($this,
"settings");
180 $form->setValuesByPost();
181 $this->settingsObject($form);
193 if ($this->rbac_system->checkAccess(
"visible,read", $this->object->getRefId())) {
194 $this->tabs_gui->addTab(
196 $lng->txt(
"settings"),
197 $this->ctrl->getLinkTarget($this,
"settings")
200 if ($this->checkPermissionBool(
"edit_permission")) {
201 $this->tabs_gui->addTab(
203 $lng->txt(
"perm_settings"),
204 $this->ctrl->getLinkTargetByClass(
'ilpermissiongui',
"perm")
loadLanguageModule(string $a_module)
Load language module.
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
getAdminTabs()
administration tabs show only permissions and trash folder
settingsObject(?ilPropertyFormGUI $a_form=null)
Display survey settings form.
__construct( $a_data, int $a_id, bool $a_call_by_reference)
getTabs()
@abstract overwrite in derived GUI class of your object type
Class ilObjectGUI Basic methods of all Output classes.
ilGlobalTemplateInterface $tpl
prepareOutput(bool $show_sub_objects=true)
This class represents an option in a radio group.
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
activateTab(string $a_id)
This class represents a text property in a property form.
setContent(string $a_html)
Sets content for standard template.
__construct(Container $dic, ilPlugin $plugin)
@inheritDoc