ILIAS  trunk Revision v11.0_alpha-3011-gc6b235a2e85
ILIAS\Survey\Mode\Standard\UIModifier Class Reference

Interface for modes. More...

+ Inheritance diagram for ILIAS\Survey\Mode\Standard\UIModifier:
+ Collaboration diagram for ILIAS\Survey\Mode\Standard\UIModifier:

Public Member Functions

 getSurveySettingsResults (\ilObjSurvey $survey, InternalGUIService $ui_service)
 
 setValuesFromForm (\ilObjSurvey $survey, \ilPropertyFormGUI $form)
 
- Public Member Functions inherited from ILIAS\Survey\Mode\AbstractUIModifier
 __construct (InternalGUIService $gui)
 
 setInternalService (InternalService $internal_service)
 
 getInternalService ()
 
 getSurveySettingsGeneral (\ilObjSurvey $survey)
 
 getSurveySettingsReminderTargets (\ilObjSurvey $survey, InternalGUIService $ui_service)
 
 getSurveySettingsResults (\ilObjSurvey $survey, InternalGUIService $ui_service)
 
 setValuesFromForm (\ilObjSurvey $survey, \ilPropertyFormGUI $form)
 
 setResultsOverviewToolbar (\ilObjSurvey $survey, \ilToolbarGUI $toolbar, int $user_id, \ilTemplate $eval_tpl)
 
 setResultsCompetenceToolbar (\ilObjSurvey $survey, \ilToolbarGUI $toolbar, int $user_id)
 
 setResultsDetailToolbar (\ilObjSurvey $survey, \ilToolbarGUI $toolbar, int $user_id, \ilTemplate $eval_tpl)
 
 addApprSelectionToToolbar (\ilObjSurvey $survey, \ilToolbarGUI $toolbar, int $user_id)
 
 getDetailPanels (array $participants, \ILIAS\Survey\Evaluation\EvaluationGUIRequest $request, \SurveyQuestionEvaluation $a_eval)
 
 setInternalService (InternalService $internal_service)
 
 getInternalService ()
 
 getSurveySettingsGeneral (\ilObjSurvey $survey)
 
 getSurveySettingsReminderTargets (\ilObjSurvey $survey, InternalGUIService $ui_service)
 
 getSurveySettingsResults (\ilObjSurvey $survey, InternalGUIService $ui_service)
 
 setValuesFromForm (\ilObjSurvey $survey, \ilPropertyFormGUI $form)
 
 setResultsOverviewToolbar (\ilObjSurvey $survey, \ilToolbarGUI $toolbar, int $user_id, \ilTemplate $eval_tpl)
 
 setResultsDetailToolbar (\ilObjSurvey $survey, \ilToolbarGUI $toolbar, int $user_id, \ilTemplate $eval_tpl)
 
 setResultsCompetenceToolbar (\ilObjSurvey $survey, \ilToolbarGUI $toolbar, int $user_id)
 
 getDetailPanels (array $participants, \ILIAS\Survey\Evaluation\EvaluationGUIRequest $request, \SurveyQuestionEvaluation $a_eval)
 

Additional Inherited Members

- Protected Member Functions inherited from ILIAS\Survey\Mode\AbstractUIModifier
 addExportAndPrintButton (\ilObjSurvey $survey, \ilToolbarGUI $toolbar, bool $details, \ilTemplate $eval_tpl)
 
 buildExportButtonAndModal (\ilTemplate $eval_tpl, string $export_cmd)
 
 getExportModal ()
 
 getPanelTable (array $participants, \ILIAS\Survey\Evaluation\EvaluationGUIRequest $request, \SurveyQuestionEvaluation $a_eval)
 
 getPanelChart (\ILIAS\Survey\Evaluation\EvaluationGUIRequest $request, \SurveyQuestionEvaluation $a_eval)
 
 getPanelText (\ILIAS\Survey\Evaluation\EvaluationGUIRequest $request, \SurveyQuestionEvaluation $a_eval, \ilSurveyEvaluationResults $question_res)
 
 getPanelCard (\ilSurveyEvaluationResults $question_res)
 
- Protected Attributes inherited from ILIAS\Survey\Mode\AbstractUIModifier
InternalGUIService $gui
 
InternalService $service = null
 

Detailed Description

Interface for modes.

Author
Alexander Killing killi.nosp@m.ng@l.nosp@m.eifos.nosp@m..de

Definition at line 30 of file class.UIModifier.php.

Member Function Documentation

◆ getSurveySettingsResults()

ILIAS\Survey\Mode\Standard\UIModifier::getSurveySettingsResults ( \ilObjSurvey  $survey,
InternalGUIService  $ui_service 
)
Returns
\ilFormPropertyGUI[]

Reimplemented from ILIAS\Survey\Mode\AbstractUIModifier.

Definition at line 32 of file class.UIModifier.php.

35 : array {
36 $items = [];
37 $lng = $ui_service->lng();
38 $anon_list = null;
39
40 $evaluation_access = new \ilRadioGroupInputGUI($lng->txt('evaluation_access'), "evaluation_access");
41
42 $option = new \ilCheckboxOption($lng->txt("evaluation_access_off"), \ilObjSurvey::EVALUATION_ACCESS_OFF, '');
43 $option->setInfo($lng->txt("svy_evaluation_access_off_info"));
44 $evaluation_access->addOption($option);
45
46 $option = new \ilCheckboxOption($lng->txt("evaluation_access_all"), \ilObjSurvey::EVALUATION_ACCESS_ALL, '');
47 $option->setInfo($lng->txt("svy_evaluation_access_all_info"));
48 $evaluation_access->addOption($option);
49
50 $option = new \ilCheckboxOption($lng->txt("evaluation_access_participants"), \ilObjSurvey::EVALUATION_ACCESS_PARTICIPANTS, '');
51 $option->setInfo($lng->txt("svy_evaluation_access_participants_info"));
52 $evaluation_access->addOption($option);
53
54 $evaluation_access->setValue($survey->getEvaluationAccess());
55 $items[] = $evaluation_access;
56
57 $anonymization_options = new \ilRadioGroupInputGUI($lng->txt("survey_results_anonymization"), "anonymization_options");
58
59 $option = new \ilCheckboxOption($lng->txt("survey_results_personalized"), "statpers");
60 $option->setInfo($lng->txt("survey_results_personalized_info"));
61 $anonymization_options->addOption($option);
62
63 $option = new \ilCheckboxOption($lng->txt("survey_results_anonymized"), "statanon");
64 $option->setInfo($lng->txt("survey_results_anonymized_info"));
65 $anonymization_options->addOption($option);
66 $anonymization_options->setValue($survey->hasAnonymizedResults()
67 ? "statanon"
68 : "statpers");
69 $items[] = $anonymization_options;
70
71 $surveySetting = new \ilSetting("survey");
72 if ($surveySetting->get("anonymous_participants", null)) {
73 $min = "";
74 if ((int) $surveySetting->get("anonymous_participants_min", "0") > 0) {
75 $min = " (" . $lng->txt("svy_anonymous_participants_min") . ": " .
76 $surveySetting->get("anonymous_participants_min") . ")";
77 }
78
79 $anon_list = new \ilCheckboxInputGUI($lng->txt("svy_anonymous_participants_svy"), "anon_list");
80 $anon_list->setInfo($lng->txt("svy_anonymous_participants_svy_info") . $min);
81 $anon_list->setChecked($survey->hasAnonymousUserList());
82 $option->addSubItem($anon_list);
83 }
84
85 if ($survey->_hasDatasets($survey->getSurveyId())) {
86 $anonymization_options->setDisabled(true);
87 if ($anon_list) {
88 $anon_list->setDisabled(true);
89 }
90 }
91
92 return $items;
93 }
const EVALUATION_ACCESS_PARTICIPANTS
const EVALUATION_ACCESS_ALL
const EVALUATION_ACCESS_OFF
global $lng
Definition: privfeed.php:31

◆ setValuesFromForm()

ILIAS\Survey\Mode\Standard\UIModifier::setValuesFromForm ( \ilObjSurvey  $survey,
\ilPropertyFormGUI  $form 
)

Reimplemented from ILIAS\Survey\Mode\AbstractUIModifier.

Definition at line 95 of file class.UIModifier.php.

98 : void {
99 $survey->setEvaluationAccess($form->getInput("evaluation_access"));
100 $survey->setCalculateSumScore((bool) $form->getInput("calculate_sum_score"));
101 $hasDatasets = \ilObjSurvey::_hasDatasets($survey->getSurveyId());
102 if (!$hasDatasets) {
103 $current = $survey->getAnonymize();
104
105 // get current setting if property is hidden
106 $codes = (bool) $form->getInput("acc_codes");
107 $anon = ((string) $form->getInput("anonymization_options") === "statanon");
108
109 // parse incoming values
110 if (!$anon) {
111 if (!$codes) {
112 $survey->setAnonymize(\ilObjSurvey::ANONYMIZE_OFF);
113 } else {
114 $survey->setAnonymize(\ilObjSurvey::ANONYMIZE_CODE_ALL);
115 }
116 } else {
117 if ($codes) {
118 $survey->setAnonymize(\ilObjSurvey::ANONYMIZE_ON);
119 } else {
120 $survey->setAnonymize(\ilObjSurvey::ANONYMIZE_FREEACCESS);
121 }
122
123 $survey->setAnonymousUserList((bool) $form->getInput("anon_list"));
124 }
125 }
126 }
const ANONYMIZE_FREEACCESS
static _hasDatasets(int $survey_id)
const ANONYMIZE_CODE_ALL

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