24include_once 
"./Services/Object/classes/class.ilObjectGUI.php";
 
   51    public function __construct($a_data, $a_id, $a_call_by_reference)
 
   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();
 
   63        $lng->loadLanguageModule(
"survey");
 
   64        parent::__construct($a_data, $a_id, $a_call_by_reference, 
false);
 
   71        $next_class = $this->ctrl->getNextClass($this);
 
   72        $cmd = $this->ctrl->getCmd();
 
   75        switch ($next_class) {
 
   76            case 'ilpermissiongui':
 
   77                $ilTabs->activateTab(
"perm_settings");
 
   78                include_once(
"Services/AccessControl/classes/class.ilPermissionGUI.php");
 
   80                $ret =&$this->ctrl->forwardCommand($perm_gui);
 
   83            case 'ilsettingstemplategui':
 
   84                $ilTabs->activateTab(
"templates");
 
   85                include_once(
"./Services/Administration/classes/class.ilSettingsTemplateGUI.php");
 
   87                $this->ctrl->forwardCommand($set_tpl_gui);
 
   91                if ($cmd == 
"" || $cmd == 
"view") {
 
  115        $ilTabs->activateTab(
"settings");
 
  121        $tpl->setContent($a_form->getHTML());
 
  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");
 
  134        include_once(
"./Services/Form/classes/class.ilPropertyFormGUI.php");
 
  137        $form->setTitle(
$lng->txt(
"survey_defaults"));
 
  141        $enable->setChecked($unlimited_invitation);
 
  142        $enable->setInfo(
$lng->txt(
"survey_unlimited_invitation_desc"));
 
  143        $form->addItem($enable);
 
  147        $code->setChecked($use_anonymous_id);
 
  148        $code->setInfo(
$lng->txt(
"use_anonymous_id_desc"));
 
  153        $eval_skipped->setRequired(
true);
 
  154        $form->addItem($eval_skipped);
 
  156        $eval_skipped->setValue($surveySetting->get(
"skipped_is_custom", 
false)
 
  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);
 
  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);
 
  173        $anon_part->setInfo(
$lng->txt(
"svy_anonymous_participants_info"));
 
  174        $anon_part->setChecked($surveySetting->get(
"anonymous_participants", 
false));
 
  175        $form->addItem($anon_part);
 
  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);
 
  184        if ($ilAccess->checkAccess(
"write", 
"", $this->object->getRefId())) {
 
  185            $form->addCommandButton(
"saveSettings", 
$lng->txt(
"save"));
 
  199        if (!$ilAccess->checkAccess(
"write", 
"", $this->object->getRefId())) {
 
  200            $ilCtrl->redirect($this, 
"settings");
 
  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);
 
  211            if (
$_POST[
"skcust"] == 
"lng") {
 
  212                $surveySetting->set(
"skipped_is_custom", 
false);
 
  214                $surveySetting->set(
"skipped_is_custom", 
true);
 
  215                $surveySetting->set(
"skipped_custom_value", trim(
$_POST[
"cust_value"]));
 
  219            $ilCtrl->redirect($this, 
"settings");
 
  222        $form->setValuesByPost();
 
  241            $this->tabs_gui->addTab(
 
  243                $lng->txt(
"settings"),
 
  244                $this->ctrl->getLinkTarget($this, 
"settings")
 
  255                $this->tabs_gui->addTab(
 
  257                    $lng->txt(
"adm_settings_templates"),
 
  258                    $this->ctrl->getLinkTargetByClass(
"ilsettingstemplategui", 
"")
 
  263            $this->tabs_gui->addTab(
 
  265                $lng->txt(
"perm_settings"),
 
  266                $this->ctrl->getLinkTargetByClass(
'ilpermissiongui', 
"perm")
 
  280        $lng->loadLanguageModule(
"survey");
 
  281        include_once 
"Modules/Survey/classes/class.ilObjSurvey.php";
 
  283        include_once(
"./Services/Administration/classes/class.ilSettingsTemplateConfig.php");
 
  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"));
 
  295            $lng->txt(
"survey_question_pool_usage"),
 
  298            array(1 => $this->lng->txt(
"survey_question_pool_usage_active"),
 
  299                0 => $this->lng->txt(
"survey_question_pool_usage_inactive"))
 
  304            "enabled_start_date",
 
  306            $lng->txt(
"start_date"),
 
  313            $lng->txt(
"end_date"),
 
  318            "show_question_titles",
 
  320            $lng->txt(
"svy_show_questiontitles"),
 
  330            $lng->txt(
"survey_access_codes"),
 
  337            $lng->txt(
"evaluation_access"),
 
  346            "anonymization_options",
 
  348            $lng->txt(
"survey_results_anonymization"),
 
  351            array(
"statpers" => $this->lng->txt(
"survey_results_personalized"),
 
  352                "statanon" => $this->lng->txt(
"survey_results_anonymized"))
 
sprintf('%.4f', $callTime)
An exception for terminatinating execution or to throw for unit testing.
Class ilObjSurveyAdministrationGUI.
$conditions
Constructor @access public.
settingsObject(ilPropertyFormGUI $a_form=null)
display survey settings form
saveSettingsObject()
Save survey settings.
executeCommand()
execute command
getAdminTabs()
administration tabs show only permissions and trash folder
__construct($a_data, $a_id, $a_call_by_reference)
getTabs()
get tabs @access public
getSettingsTemplateConfig()
Get settings template configuration object.
const EVALUATION_ACCESS_PARTICIPANTS
const EVALUATION_ACCESS_ALL
const EVALUATION_ACCESS_OFF
Class ilObjectGUI Basic methods of all Output classes.
prepareOutput($a_show_subobjects=true)
prepare output
checkPermissionBool($a_perm, $a_cmd="", $a_type="", $a_ref_id=null)
Check permission.
New PermissionGUI (extends from old ilPermission2GUI) RBAC related output.
This class represents an option in a radio group.
Settings template config class.
This class represents a text property in a property form.
static sendSuccess($a_info="", $a_keep=false)
Send Success Message to Screen.
if(isset($_POST['submit'])) $form