ILIAS  release_8 Revision v8.19-1-g4e8f2f9140c
All Data Structures Namespaces Files Functions Variables 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, $factory, $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
$factory
Definition: metadata.php:75
+ 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\LTI\ToolProvider\$settings, ILIAS\Repository\ctrl(), 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  return $this->input_factory->container()->form()->standard(
152  $this->ctrl->getFormAction($this, "update"),
153  [$field]
154  )
156  $this->refinery->custom()->transformation(function ($v) {
157  return array_shift($v);
158  })
159  );
160  }
array $settings
Setting values (LTI parameters, custom parameters and local parameters).
Definition: System.php:200
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ buildInfoSettingsForm()

ilIndividualAssessmentSettingsGUI::buildInfoSettingsForm ( )
protected

Definition at line 209 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().

209  : Form\Form
210  {
211  $info_settings = $this->object->getInfoSettings();
212  $field = $info_settings->toFormInput(
213  $this->input_factory->field(),
214  $this->lng,
216  );
217  return $this->input_factory->container()->form()->standard(
218  $this->ctrl->getFormAction($this, "updateInfo"),
219  [$field]
220  )
222  $this->refinery->custom()->transformation(function ($v) {
223  return array_shift($v);
224  })
225  );
226  }
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ edit()

ilIndividualAssessmentSettingsGUI::edit ( )
protected

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

References buildForm().

Referenced by executeCommand().

162  : void
163  {
164  $this->tabs_gui->setSubTabActive(self::TAB_EDIT);
165  $form = $this->buildForm();
166  $this->tpl->setContent($this->ui_renderer->render($form));
167  }
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ editInfo()

ilIndividualAssessmentSettingsGUI::editInfo ( )
protected

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

References buildInfoSettingsForm().

Referenced by executeCommand().

186  : void
187  {
188  $this->tabs_gui->setSubTabActive(self::TAB_EDIT_INFO);
189  $form = $this->buildInfoSettingsForm();
190  $this->tpl->setContent($this->ui_renderer->render($form));
191  }
+ 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("edit"),
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 228 of file class.ilIndividualAssessmentSettingsGUI.php.

References ILIAS\Repository\lng().

Referenced by executeCommand().

228  : void
229  {
230  $this->error_object->raiseError($this->lng->txt("msg_no_perm_read"), $this->error_object->WARNING);
231  }
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ update()

ilIndividualAssessmentSettingsGUI::update ( )
protected

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

References ILIAS\LTI\ToolProvider\$settings, buildForm(), ILIAS\Repository\ctrl(), and ILIAS\Repository\lng().

Referenced by executeCommand().

169  : void
170  {
171  $form = $this->buildForm();
172  $form = $form->withRequest($this->http_request);
173 
174  $settings = $form->getData();
175 
176  if (!is_null($settings)) {
177  $this->object->setSettings($settings);
178  $this->object->update();
179  $this->tpl->setOnScreenMessage("success", $this->lng->txt("settings_saved"), true);
180  $this->ctrl->redirect($this, "edit");
181  } else {
182  $this->tpl->setContent($this->ui_renderer->render($form));
183  }
184  }
array $settings
Setting values (LTI parameters, custom parameters and local parameters).
Definition: System.php:200
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ updateInfo()

ilIndividualAssessmentSettingsGUI::updateInfo ( )
protected

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

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

Referenced by executeCommand().

193  : void
194  {
195  $form = $this->buildInfoSettingsForm();
196  $form = $form->withRequest($this->http_request);
197 
198  $info_settings = $form->getData();
199 
200  if (!is_null($info_settings)) {
201  $this->object->setInfoSettings($info_settings);
202  $this->object->updateInfo();
203  $this->ctrl->redirect($this, "editInfo");
204  } else {
205  $this->tpl->setContent($this->ui_renderer->render($form));
206  }
207  }
+ 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: