ILIAS  trunk Revision v11.0_alpha-1811-gd2d5443e411
All Data Structures Namespaces Files Functions Variables Enumerations Enumerator Modules Pages
ilIndividualAssessmentSettingsGUI Class Reference

ilIndividualAssessmentSettingsGUI: ilIndividualAssessmentCommonSettingsGUI More...

+ Collaboration diagram for ilIndividualAssessmentSettingsGUI:

Public Member Functions

 __construct (ilObjIndividualAssessment $object, ilCtrl $ctrl, ilGlobalPageTemplate $tpl, ilLanguage $lng, ilTabsGUI $tabs_gui, Input\Factory $factory, Refinery\Factory $refinery, UI\Renderer $ui_renderer, $http_request, ilErrorHandling $error_object, ilIndividualAssessmentCommonSettingsGUI $common_settings_gui)
 
 executeCommand ()
 
 handleAccessViolation ()
 

Data Fields

const TAB_EDIT = 'settings'
 
const TAB_EDIT_INFO = 'infoSettings'
 
const TAB_COMMON_SETTINGS = 'commonSettings'
 

Protected Member Functions

 getSubTabs (ilTabsGUI $tabs)
 
 buildForm ()
 
 edit ()
 
 update ()
 
 editInfo ()
 
 updateInfo ()
 
 buildInfoSettingsForm ()
 

Protected Attributes

ilCtrl $ctrl
 
ilObjIndividualAssessment $object
 
ilGlobalPageTemplate $tpl
 
ilLanguage $lng
 
ilTabsGUI $tabs_gui
 
IndividualAssessmentAccessHandler $iass_access
 
Input Factory $input_factory
 
Refinery Factory $refinery
 
UI Renderer $ui_renderer
 
 $http_request
 
ilErrorHandling $error_object
 
ilIndividualAssessmentCommonSettingsGUI $common_settings_gui
 

Detailed Description

Constructor & Destructor Documentation

◆ __construct()

ilIndividualAssessmentSettingsGUI::__construct ( ilObjIndividualAssessment  $object,
ilCtrl  $ctrl,
ilGlobalPageTemplate  $tpl,
ilLanguage  $lng,
ilTabsGUI  $tabs_gui,
Input\Factory  $factory,
Refinery\Factory  $refinery,
UI\Renderer  $ui_renderer,
  $http_request,
ilErrorHandling  $error_object,
ilIndividualAssessmentCommonSettingsGUI  $common_settings_gui 
)

Definition at line 54 of file class.ilIndividualAssessmentSettingsGUI.php.

References $common_settings_gui, $ctrl, $error_object, $http_request, $lng, $object, $refinery, $tabs_gui, $tpl, $ui_renderer, ILIAS\Repository\ctrl(), getSubTabs(), ILIAS\Repository\lng(), and ILIAS\Repository\refinery().

66  {
67  $this->ctrl = $ctrl;
68  $this->object = $object;
69  $this->tpl = $tpl;
70  $this->lng = $lng;
71  $this->tabs_gui = $tabs_gui;
72  $this->iass_access = $this->object->accessHandler();
73 
74  $this->input_factory = $factory;
75  $this->refinery = $refinery;
76  $this->ui_renderer = $ui_renderer;
77  $this->http_request = $http_request;
78 
79  $this->error_object = $error_object;
80  $this->common_settings_gui = $common_settings_gui;
81 
82  $this->getSubTabs($this->tabs_gui);
83  $this->lng->loadLanguageModule('content');
84  $this->lng->loadLanguageModule('obj');
85  $this->lng->loadLanguageModule('cntr');
86  }
ilIndividualAssessmentCommonSettingsGUI $common_settings_gui
+ Here is the call graph for this function:

Member Function Documentation

◆ buildForm()

ilIndividualAssessmentSettingsGUI::buildForm ( )
protected

Definition at line 143 of file class.ilIndividualAssessmentSettingsGUI.php.

References $lng, $refinery, ILIAS\Repository\ctrl(), ILIAS\Repository\lng(), ILIAS\Repository\refinery(), and ILIAS\UI\Implementation\Component\Input\ViewControl\withAdditionalTransformation().

Referenced by edit(), and update().

143  : Form\Form
144  {
145  $settings = $this->object->getSettings();
146  $field = $settings->toFormInput(
147  $this->input_factory->field(),
148  $this->lng,
150  );
151 
152  // Use centralized on/offline
153  $online = $this->object->getObjectProperties()->getPropertyIsOnline()->toForm(
154  $this->lng,
155  $this->input_factory->field(),
157  );
158  $availability = $this->input_factory->field()->section(
159  [$online],
160  $this->lng->txt('iass_settings_availability')
162  $this->refinery->custom()->transformation(function ($v) {
163  return array_shift($v);
164  })
165  );
166 
167  return $this->input_factory->container()->form()->standard(
168  $this->ctrl->getFormAction($this, "update"),
169  [$field, $availability]
170  );
171  }
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ buildInfoSettingsForm()

ilIndividualAssessmentSettingsGUI::buildInfoSettingsForm ( )
protected

Definition at line 223 of file class.ilIndividualAssessmentSettingsGUI.php.

References $lng, $refinery, ILIAS\Repository\ctrl(), ILIAS\Repository\refinery(), and ILIAS\UI\Implementation\Component\Input\ViewControl\withAdditionalTransformation().

Referenced by editInfo(), and updateInfo().

223  : Form\Form
224  {
225  $info_settings = $this->object->getInfoSettings();
226  $field = $info_settings->toFormInput(
227  $this->input_factory->field(),
228  $this->lng,
230  );
231  return $this->input_factory->container()->form()->standard(
232  $this->ctrl->getFormAction($this, "updateInfo"),
233  [$field]
234  )
236  $this->refinery->custom()->transformation(function ($v) {
237  return array_shift($v);
238  })
239  );
240  }
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ edit()

ilIndividualAssessmentSettingsGUI::edit ( )
protected

Definition at line 173 of file class.ilIndividualAssessmentSettingsGUI.php.

References buildForm().

Referenced by executeCommand().

173  : void
174  {
175  $this->tabs_gui->setSubTabActive(self::TAB_EDIT);
176  $form = $this->buildForm();
177  $this->tpl->setContent($this->ui_renderer->render($form));
178  }
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ editInfo()

ilIndividualAssessmentSettingsGUI::editInfo ( )
protected

Definition at line 200 of file class.ilIndividualAssessmentSettingsGUI.php.

References buildInfoSettingsForm().

Referenced by executeCommand().

200  : void
201  {
202  $this->tabs_gui->setSubTabActive(self::TAB_EDIT_INFO);
203  $form = $this->buildInfoSettingsForm();
204  $this->tpl->setContent($this->ui_renderer->render($form));
205  }
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ executeCommand()

ilIndividualAssessmentSettingsGUI::executeCommand ( )

Definition at line 113 of file class.ilIndividualAssessmentSettingsGUI.php.

References ILIAS\Repository\ctrl(), edit(), editInfo(), handleAccessViolation(), update(), and updateInfo().

113  : void
114  {
115  if (!$this->iass_access->mayEditObject()) {
116  $this->handleAccessViolation();
117  }
118  $next_class = $this->ctrl->getNextClass();
119  $cmd = $this->ctrl->getCmd();
120  switch ($next_class) {
121  case 'ilindividualassessmentcommonsettingsgui':
122  $this->tabs_gui->activateSubTab(self::TAB_COMMON_SETTINGS);
123  $this->ctrl->forwardCommand($this->common_settings_gui);
124  break;
125  default:
126  switch ($cmd) {
127  case 'edit':
128  $this->edit();
129  break;
130  case 'update':
131  $this->update();
132  break;
133  case 'editInfo':
134  $this->editInfo();
135  break;
136  case 'updateInfo':
137  $this->updateInfo();
138  break;
139  }
140  }
141  }
+ Here is the call graph for this function:

◆ getSubTabs()

ilIndividualAssessmentSettingsGUI::getSubTabs ( ilTabsGUI  $tabs)
protected

Definition at line 88 of file class.ilIndividualAssessmentSettingsGUI.php.

References ilTabsGUI\addSubTab(), ilIndividualAssessmentCommonSettingsGUI\CMD_EDIT, ILIAS\Repository\ctrl(), and ILIAS\Repository\lng().

Referenced by __construct().

88  : void
89  {
90  $tabs->addSubTab(
91  self::TAB_EDIT,
92  $this->lng->txt("general"),
93  $this->ctrl->getLinkTarget($this, 'edit')
94  );
95  $tabs->addSubTab(
96  self::TAB_COMMON_SETTINGS,
97  $this->lng->txt("obj_features"),
98  $this->ctrl->getLinkTargetByClass(
99  [
100  self::class,
101  ilIndividualAssessmentCommonSettingsGUI::class
102  ],
104  )
105  );
106  $tabs->addSubTab(
107  self::TAB_EDIT_INFO,
108  $this->lng->txt("iass_edit_info"),
109  $this->ctrl->getLinkTarget($this, 'editInfo')
110  );
111  }
addSubTab(string $a_id, string $a_text, string $a_link, string $a_frame="")
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ handleAccessViolation()

ilIndividualAssessmentSettingsGUI::handleAccessViolation ( )

Definition at line 242 of file class.ilIndividualAssessmentSettingsGUI.php.

References ILIAS\Repository\lng().

Referenced by executeCommand().

242  : void
243  {
244  $this->error_object->raiseError($this->lng->txt("msg_no_perm_read"), $this->error_object->WARNING);
245  }
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ update()

ilIndividualAssessmentSettingsGUI::update ( )
protected

Definition at line 180 of file class.ilIndividualAssessmentSettingsGUI.php.

References buildForm(), ILIAS\Repository\ctrl(), and ILIAS\Repository\lng().

Referenced by executeCommand().

180  : void
181  {
182  $form = $this->buildForm();
183  $form = $form->withRequest($this->http_request);
184 
185  $settings = $form->getData();
186 
187  if (!is_null($settings)) {
188  $this->object->setSettings($settings[0]);
189  $this->object->update();
190 
191  $this->object->getObjectProperties()->storePropertyIsOnline($settings[1]);
192 
193  $this->tpl->setOnScreenMessage("success", $this->lng->txt("settings_saved"), true);
194  $this->ctrl->redirect($this, "edit");
195  } else {
196  $this->tpl->setContent($this->ui_renderer->render($form));
197  }
198  }
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ updateInfo()

ilIndividualAssessmentSettingsGUI::updateInfo ( )
protected

Definition at line 207 of file class.ilIndividualAssessmentSettingsGUI.php.

References buildInfoSettingsForm(), and ILIAS\Repository\ctrl().

Referenced by executeCommand().

207  : void
208  {
209  $form = $this->buildInfoSettingsForm();
210  $form = $form->withRequest($this->http_request);
211 
212  $info_settings = $form->getData();
213 
214  if (!is_null($info_settings)) {
215  $this->object->setInfoSettings($info_settings);
216  $this->object->updateInfo();
217  $this->ctrl->redirect($this, "editInfo");
218  } else {
219  $this->tpl->setContent($this->ui_renderer->render($form));
220  }
221  }
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

Field Documentation

◆ $common_settings_gui

ilIndividualAssessmentCommonSettingsGUI ilIndividualAssessmentSettingsGUI::$common_settings_gui
protected

Definition at line 52 of file class.ilIndividualAssessmentSettingsGUI.php.

Referenced by __construct().

◆ $ctrl

ilCtrl ilIndividualAssessmentSettingsGUI::$ctrl
protected

Definition at line 37 of file class.ilIndividualAssessmentSettingsGUI.php.

Referenced by __construct().

◆ $error_object

ilErrorHandling ilIndividualAssessmentSettingsGUI::$error_object
protected

Definition at line 51 of file class.ilIndividualAssessmentSettingsGUI.php.

Referenced by __construct().

◆ $http_request

ilIndividualAssessmentSettingsGUI::$http_request
protected

Definition at line 50 of file class.ilIndividualAssessmentSettingsGUI.php.

Referenced by __construct().

◆ $iass_access

IndividualAssessmentAccessHandler ilIndividualAssessmentSettingsGUI::$iass_access
protected

Definition at line 42 of file class.ilIndividualAssessmentSettingsGUI.php.

◆ $input_factory

Input Factory ilIndividualAssessmentSettingsGUI::$input_factory
protected

Definition at line 43 of file class.ilIndividualAssessmentSettingsGUI.php.

◆ $lng

ilLanguage ilIndividualAssessmentSettingsGUI::$lng
protected

◆ $object

ilObjIndividualAssessment ilIndividualAssessmentSettingsGUI::$object
protected

Definition at line 38 of file class.ilIndividualAssessmentSettingsGUI.php.

Referenced by __construct().

◆ $refinery

Refinery Factory ilIndividualAssessmentSettingsGUI::$refinery
protected

◆ $tabs_gui

ilTabsGUI ilIndividualAssessmentSettingsGUI::$tabs_gui
protected

Definition at line 41 of file class.ilIndividualAssessmentSettingsGUI.php.

Referenced by __construct().

◆ $tpl

ilGlobalPageTemplate ilIndividualAssessmentSettingsGUI::$tpl
protected

Definition at line 39 of file class.ilIndividualAssessmentSettingsGUI.php.

Referenced by __construct().

◆ $ui_renderer

UI Renderer ilIndividualAssessmentSettingsGUI::$ui_renderer
protected

Definition at line 45 of file class.ilIndividualAssessmentSettingsGUI.php.

Referenced by __construct().

◆ TAB_COMMON_SETTINGS

const ilIndividualAssessmentSettingsGUI::TAB_COMMON_SETTINGS = 'commonSettings'

Definition at line 35 of file class.ilIndividualAssessmentSettingsGUI.php.

◆ TAB_EDIT

const ilIndividualAssessmentSettingsGUI::TAB_EDIT = 'settings'

Definition at line 33 of file class.ilIndividualAssessmentSettingsGUI.php.

◆ TAB_EDIT_INFO

const ilIndividualAssessmentSettingsGUI::TAB_EDIT_INFO = 'infoSettings'

Definition at line 34 of file class.ilIndividualAssessmentSettingsGUI.php.


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