ILIAS  trunk Revision v11.0_alpha-1749-g1a06bdef097
All Data Structures Namespaces Files Functions Variables Enumerations Enumerator Modules Pages
class.UIModifier.php
Go to the documentation of this file.
1 <?php
2 
19 declare(strict_types=1);
20 
22 
25 
31 {
32  public function getSurveySettingsResults(
33  \ilObjSurvey $survey,
34  InternalGUIService $ui_service
35  ): array {
36  $items = [];
37  $lng = $ui_service->lng();
38 
39  //check the names of these vars
40  $evaluation_access = new \ilRadioGroupInputGUI($lng->txt('evaluation_access'), "self_eval_res");
41  $evaluation_access->setValue((string) $survey->getSelfEvaluationResults());
42 
43  $option = new \ilRadioOption($lng->txt("svy_self_ev_access_results_none"), (string) \ilObjSurvey::RESULTS_SELF_EVAL_NONE);
44  $evaluation_access->addOption($option);
45 
46  $option = new \ilRadioOption($lng->txt("svy_self_ev_access_results_own"), (string) \ilObjSurvey::RESULTS_SELF_EVAL_OWN);
47  $evaluation_access->addOption($option);
48 
49  $option = new \ilRadioOption($lng->txt("svy_self_ev_access_results_all"), (string) \ilObjSurvey::RESULTS_SELF_EVAL_ALL);
50  $evaluation_access->addOption($option);
51 
52  $items[] = $evaluation_access;
53 
54  return $items;
55  }
56 
57  public function setValuesFromForm(
58  \ilObjSurvey $survey,
59  \ilPropertyFormGUI $form
60  ): void {
61  $survey->setSelfEvaluationResults((int) $form->getInput("self_eval_res"));
62  }
63 }
setValuesFromForm(\ilObjSurvey $survey, \ilPropertyFormGUI $form)
setSelfEvaluationResults(int $a_value)
getInput(string $a_post_var, bool $ensureValidation=true)
Returns the input of an item, if item provides getInput method and as fallback the value of the HTTP-...
const RESULTS_SELF_EVAL_OWN
getSurveySettingsResults(\ilObjSurvey $survey, InternalGUIService $ui_service)
global $lng
Definition: privfeed.php:31
const RESULTS_SELF_EVAL_NONE
const RESULTS_SELF_EVAL_ALL