ILIAS  release_8 Revision v8.19
All Data Structures Namespaces Files Functions Variables Modules Pages
class.UIModifier.php
Go to the documentation of this file.
1 <?php
2 
3 declare(strict_types=1);
4 
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)
$lng
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-...
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
const RESULTS_SELF_EVAL_OWN
getSurveySettingsResults(\ilObjSurvey $survey, InternalGUIService $ui_service)
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
const RESULTS_SELF_EVAL_NONE
const RESULTS_SELF_EVAL_ALL