ILIAS  release_5-4 Revision v5.4.26-12-gabc799a52e6
ilIndividualAssessmentSettingsGUI Class Reference
+ Collaboration diagram for ilIndividualAssessmentSettingsGUI:

Public Member Functions

 executeCommand ()
 

Data Fields

const PROP_CONTENT = "content"
 
const PROP_RECORD_TEMPLATE = "record_template"
 
const PROP_TITLE = "title"
 
const PROP_DESCRIPTION = "description"
 
const PROP_EVENT_TIME_PLACE_REQUIRED = "event_time_place_required"
 
const PROP_FILE_REQUIRED = "file_required"
 
const PROP_INFO_CONTACT = "contact"
 
const PROP_INFO_RESPONSIBILITY = "responsibility"
 
const PROP_INFO_PHONE = "phone"
 
const PROP_INFO_MAILS = "mails"
 
const PROP_INFO_CONSULTATION = "consultation"
 
const TAB_EDIT = 'settings'
 
const TAB_EDIT_INFO = 'infoSettings'
 

Protected Member Functions

 getSubTabs (ilTabsGUI $tabs)
 
 cancel ()
 
 edit ()
 
 editInfo ()
 
 updateInfo ()
 
 renderForm (ilPropertyFormGUI $a_form)
 
 update ()
 
 initSettingsForm ()
 
 addCommonFieldsToForm (\ilPropertyFormGUI $form)
 
 initInfoSettingsForm ()
 
 fillInfoForm (ilPropertyFormGUI $a_form, ilIndividualAssessmentInfoSettings $settings)
 
 fillForm (ilPropertyFormGUI $a_form, ilObjIndividualAssessment $iass, ilIndividualAssessmentSettings $settings)
 

Detailed Description

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

Member Function Documentation

◆ addCommonFieldsToForm()

ilIndividualAssessmentSettingsGUI::addCommonFieldsToForm ( \ilPropertyFormGUI  $form)
protected

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

References ilPropertyFormGUI\addItem().

Referenced by edit(), and update().

204  {
205  $section_appearance = new ilFormSectionHeaderGUI();
206  $section_appearance->setTitle($this->lng->txt('cont_presentation'));
207  $form->addItem($section_appearance);
208  $form_service = $this->obj_service->commonSettings()->legacyForm($form, $this->object);
209  $form = $form_service->addTitleIconVisibility();
210  $form = $form_service->addTopActionsVisibility();
211  $form = $form_service->addIcon();
212  $form = $form_service->addTileImage();
213  }
This class represents a section header in a property form.
if(isset($_POST['submit'])) $form
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ cancel()

ilIndividualAssessmentSettingsGUI::cancel ( )
protected

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

74  {
75  $this->ctrl->redirect($this->parent_gui);
76  }

◆ edit()

ilIndividualAssessmentSettingsGUI::edit ( )
protected

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

References $form, addCommonFieldsToForm(), fillForm(), initSettingsForm(), and renderForm().

79  {
80  $this->tabs_gui->setSubTabActive(self::TAB_EDIT);
81  $form = $this->fillForm($this->initSettingsForm(), $this->object, $this->object->getSettings());
83  $this->renderForm($form);
84  }
fillForm(ilPropertyFormGUI $a_form, ilObjIndividualAssessment $iass, ilIndividualAssessmentSettings $settings)
if(isset($_POST['submit'])) $form
+ Here is the call graph for this function:

◆ editInfo()

ilIndividualAssessmentSettingsGUI::editInfo ( )
protected

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

References $form, fillInfoForm(), initInfoSettingsForm(), and renderForm().

87  {
88  $this->tabs_gui->setSubTabActive(self::TAB_EDIT_INFO);
89  $form = $this->fillInfoForm($this->initInfoSettingsForm(), $this->object->getInfoSettings());
90  $this->renderForm($form);
91  }
fillInfoForm(ilPropertyFormGUI $a_form, ilIndividualAssessmentInfoSettings $settings)
if(isset($_POST['submit'])) $form
+ Here is the call graph for this function:

◆ executeCommand()

ilIndividualAssessmentSettingsGUI::executeCommand ( )

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

56  {
57  $cmd = $this->ctrl->getCmd();
58  switch ($cmd) {
59  case 'edit':
60  case 'update':
61  case 'cancel':
62  case 'editInfo':
63  case 'updateInfo':
64  if (!$this->iass_access->mayEditObject()) {
65  $this->parent_gui->handleAccessViolation();
66  }
67  $this->$cmd();
68  break;
69  }
70  }

◆ fillForm()

ilIndividualAssessmentSettingsGUI::fillForm ( ilPropertyFormGUI  $a_form,
ilObjIndividualAssessment  $iass,
ilIndividualAssessmentSettings  $settings 
)
protected

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

References ilContainer\_lookupContainerSetting(), ilIndividualAssessmentSettings\content(), ilObjectServiceSettingsGUI\CUSTOM_METADATA, ilIndividualAssessmentSettings\eventTimePlaceRequired(), ilIndividualAssessmentSettings\fileRequired(), ilObject\getDescription(), ilObject\getId(), ilOrgUnitGlobalSettings\getInstance(), ilObject\getTitle(), ilObjectServiceSettingsGUI\ORGU_POSITION_ACCESS, ilIndividualAssessmentSettings\recordTemplate(), and ilPropertyFormGUI\setValuesByArray().

Referenced by edit().

260  {
261  $a_form->setValuesByArray(array(
262  self::PROP_TITLE => $iass->getTitle()
263  , self::PROP_DESCRIPTION => $iass->getDescription()
264  , self::PROP_CONTENT => $settings->content()
265  , self::PROP_RECORD_TEMPLATE => $settings->recordTemplate()
266  , self::PROP_EVENT_TIME_PLACE_REQUIRED => $settings->eventTimePlaceRequired()
267  , self::PROP_FILE_REQUIRED => $settings->fileRequired()
268  , ilObjectServiceSettingsGUI::ORGU_POSITION_ACCESS => (bool) ilOrgUnitGlobalSettings::getInstance()->isPositionAccessActiveForObject($iass->getId())
270  $this->object->getId(),
272  false
273  )
274  ));
275  return $a_form;
276  }
eventTimePlaceRequired()
Get the value of the checkbox event_time_place_require.
recordTemplate()
Get the record template to be used as default record with corresponding object.
getId()
get object id public
content()
Get the content of this assessment, e.g.
getTitle()
get object title public
getDescription()
get object description
fileRequired()
Get the value of the checkbox file_required.
setValuesByArray($a_values, $a_restrict_to_value_keys=false)
Set form values from an array.
static _lookupContainerSetting($a_id, $a_keyword, $a_default_value=null)
Lookup a container setting.
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ fillInfoForm()

ilIndividualAssessmentSettingsGUI::fillInfoForm ( ilPropertyFormGUI  $a_form,
ilIndividualAssessmentInfoSettings  $settings 
)
protected

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

References ilIndividualAssessmentInfoSettings\consultationHours(), ilIndividualAssessmentInfoSettings\contact(), ilIndividualAssessmentInfoSettings\mails(), ilIndividualAssessmentInfoSettings\phone(), ilIndividualAssessmentInfoSettings\responsibility(), and ilPropertyFormGUI\setValuesByArray().

Referenced by editInfo().

248  {
249  $a_form->setValuesByArray(array(
250  self::PROP_INFO_CONTACT => $settings->contact()
251  , self::PROP_INFO_RESPONSIBILITY => $settings->responsibility()
252  , self::PROP_INFO_PHONE => $settings->phone()
253  , self::PROP_INFO_MAILS => $settings->mails()
254  , self::PROP_INFO_CONSULTATION => $settings->consultationHours()
255  ));
256  return $a_form;
257  }
setValuesByArray($a_values, $a_restrict_to_value_keys=false)
Set form values from an array.
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getSubTabs()

ilIndividualAssessmentSettingsGUI::getSubTabs ( ilTabsGUI  $tabs)
protected

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

References ilTabsGUI\addSubTab().

42  {
43  $tabs->addSubTab(
44  self::TAB_EDIT,
45  $this->lng->txt("edit"),
46  $this->ctrl->getLinkTarget($this, 'edit')
47  );
48  $tabs->addSubTab(
49  self::TAB_EDIT_INFO,
50  $this->lng->txt("iass_edit_info"),
51  $this->ctrl->getLinkTarget($this, 'editInfo')
52  );
53  }
addSubTab($a_id, $a_text, $a_link, $a_frame="")
Add a Subtab.
+ Here is the call graph for this function:

◆ initInfoSettingsForm()

ilIndividualAssessmentSettingsGUI::initInfoSettingsForm ( )
protected

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

References $form, ilFormPropertyGUI\setInfo(), and ilTextInputGUI\setSize().

Referenced by editInfo(), and updateInfo().

216  {
217  include_once("Services/Form/classes/class.ilPropertyFormGUI.php");
218  $form = new ilPropertyFormGUI();
219  $form->setFormAction($this->ctrl->getFormAction($this));
220  $form->setTitle($this->lng->txt('iass_edit_info'));
221 
222  $ti = new ilTextInputGUI($this->lng->txt('iass_contact'), self::PROP_INFO_CONTACT);
223  $ti->setSize(40);
224  $form->addItem($ti);
225 
226  $ti = new ilTextInputGUI($this->lng->txt('iass_responsibility'), self::PROP_INFO_RESPONSIBILITY);
227  $ti->setSize(40);
228  $form->addItem($ti);
229 
230  $ti = new ilTextInputGUI($this->lng->txt('iass_phone'), self::PROP_INFO_PHONE);
231  $ti->setSize(40);
232  $form->addItem($ti);
233 
234  $ti = new ilTextInputGUI($this->lng->txt('iass_mails'), self::PROP_INFO_MAILS);
235  $ti->setInfo($this->lng->txt('iass_info_emails_expl'));
236  $ti->setSize(300);
237  $form->addItem($ti);
238 
239  $item = new ilTextAreaInputGUI($this->lng->txt('iass_consultation_hours'), self::PROP_INFO_CONSULTATION);
240  $form->addItem($item);
241 
242  $form->addCommandButton('updateInfo', $this->lng->txt('save'));
243  $form->addCommandButton('cancel', $this->lng->txt('cancel'));
244  return $form;
245  }
This class represents a property form user interface.
setInfo($a_info)
Set Information Text.
if(isset($_POST['submit'])) $form
setSize($a_size)
Set Size.
This class represents a text property in a property form.
This class represents a text area property in a property form.
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ initSettingsForm()

ilIndividualAssessmentSettingsGUI::initSettingsForm ( )
protected

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

References $form, ilObjectServiceSettingsGUI\CUSTOM_METADATA, ilObjectServiceSettingsGUI\initServiceSettingsForm(), ilObjectServiceSettingsGUI\ORGU_POSITION_ACCESS, ilTextAreaInputGUI\setCols(), ilFormPropertyGUI\setInfo(), and ilTextInputGUI\setSize().

Referenced by edit(), and update().

150  {
151  $form = new ilPropertyFormGUI();
152  $form->setFormAction($this->ctrl->getFormAction($this));
153  $form->setTitle($this->lng->txt('iass_edit'));
154 
155  // title
156  $ti = new ilTextInputGUI($this->lng->txt('title'), self::PROP_TITLE);
157  $ti->setSize(40);
158  $ti->setRequired(true);
159  $form->addItem($ti);
160 
161  // description
162  $ta = new ilTextAreaInputGUI($this->lng->txt('description'), self::PROP_DESCRIPTION);
163  $ta->setCols(40);
164  $ta->setRows(2);
165  $form->addItem($ta);
166 
167 
168  $item = new ilTextAreaInputGUI($this->lng->txt('iass_content'), self::PROP_CONTENT);
169  $item->setInfo($this->lng->txt('iass_content_explanation'));
170  $form->addItem($item);
171 
172  $item = new ilTextAreaInputGUI($this->lng->txt('iass_record_template'), self::PROP_RECORD_TEMPLATE);
173  $item->setInfo($this->lng->txt('iass_record_template_explanation'));
174  $form->addItem($item);
175 
176  $option = new ilCheckboxInputGUI($this->lng->txt('iass_event_time_place_required'), self::PROP_EVENT_TIME_PLACE_REQUIRED);
177  $option->setInfo($this->lng->txt('iass_event_time_place_required_info'));
178  $form->addItem($option);
179 
180  $option = new ilCheckboxInputGUI($this->lng->txt('iass_file_required'), self::PROP_FILE_REQUIRED);
181  $option->setInfo($this->lng->txt('iass_file_required_info'));
182  $form->addItem($option);
183 
184  $form->addCommandButton('update', $this->lng->txt('save'));
185  $form->addCommandButton('cancel', $this->lng->txt('cancel'));
186 
187  $sh = new ilFormSectionHeaderGUI();
188  $sh->setTitle($this->lng->txt("obj_features"));
189  $form->addItem($sh);
190 
192  $this->object->getId(),
193  $form,
194  [
197  ]
198  );
199 
200  return $form;
201  }
This class represents a property form user interface.
This class represents a section header in a property form.
This class represents a checkbox property in a property form.
setInfo($a_info)
Set Information Text.
if(isset($_POST['submit'])) $form
setSize($a_size)
Set Size.
This class represents a text property in a property form.
This class represents a text area property in a property form.
static initServiceSettingsForm($a_obj_id, ilPropertyFormGUI $form, $services)
Init service settings form.
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ renderForm()

ilIndividualAssessmentSettingsGUI::renderForm ( ilPropertyFormGUI  $a_form)
protected

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

References ilPropertyFormGUI\getHTML().

Referenced by edit(), and editInfo().

112  {
113  $this->tpl->setContent($a_form->getHTML());
114  }
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ update()

ilIndividualAssessmentSettingsGUI::update ( )
protected

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

References $_POST, $form, addCommonFieldsToForm(), ilObjectServiceSettingsGUI\CUSTOM_METADATA, initSettingsForm(), ilObjectServiceSettingsGUI\ORGU_POSITION_ACCESS, and ilObjectServiceSettingsGUI\updateServiceSettingsForm().

117  {
118  $this->tabs_gui->setSubTabActive(self::TAB_EDIT);
119  $form = $this->initSettingsForm();
120  $form->setValuesByArray($_POST);
122  if ($form->checkInput()) {
123  $this->object->setTitle($_POST[self::PROP_TITLE]);
124  $this->object->setDescription($_POST[self::PROP_DESCRIPTION]);
125  $this->object->getSettings()->setContent($_POST[self::PROP_CONTENT])
126  ->setRecordTemplate($_POST[self::PROP_RECORD_TEMPLATE])
127  ->setEventTimePlaceRequired((bool) $_POST[self::PROP_EVENT_TIME_PLACE_REQUIRED])
128  ->setFileRequired((bool) $_POST[self::PROP_FILE_REQUIRED]);
129  $this->object->update();
131  $this->object->getId(),
132  $form,
133  [
136  ]
137  );
138  $form_service = $this->obj_service->commonSettings()->legacyForm($form, $this->object);
139  $form_service->saveTitleIconVisibility();
140  $form_service->saveTopActionsVisibility();
141  $form_service->saveIcon();
142  $form_service->saveTileImage();
143  ilUtil::sendSuccess($this->lng->txt('iass_settings_saved'), true);
144  }
145  $this->ctrl->redirect($this, "edit");
146  }
if(isset($_POST['submit'])) $form
static updateServiceSettingsForm($a_obj_id, ilPropertyFormGUI $form, $services)
Update service settings.
$_POST["username"]
+ Here is the call graph for this function:

◆ updateInfo()

ilIndividualAssessmentSettingsGUI::updateInfo ( )
protected

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

References $_POST, $form, and initInfoSettingsForm().

94  {
95  $this->tabs_gui->setSubTabActive(self::TAB_EDIT_INFO);
96  $form = $this->initInfoSettingsForm();
97  $form->setValuesByArray($_POST);
98  if ($form->checkInput()) {
99  $this->object->getInfoSettings()
100  ->setContact($_POST[self::PROP_INFO_CONTACT])
101  ->setResponsibility($_POST[self::PROP_INFO_RESPONSIBILITY])
102  ->setPhone($_POST[self::PROP_INFO_PHONE])
103  ->setMails($_POST[self::PROP_INFO_MAILS])
104  ->setConsultationHours($_POST[self::PROP_INFO_CONSULTATION]);
105  $this->object->updateInfo();
106  ilUtil::sendSuccess($this->lng->txt('iass_settings_saved'), true);
107  }
108  $this->ctrl->redirect($this, "editInfo");
109  }
if(isset($_POST['submit'])) $form
$_POST["username"]
+ Here is the call graph for this function:

Field Documentation

◆ PROP_CONTENT

const ilIndividualAssessmentSettingsGUI::PROP_CONTENT = "content"

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

◆ PROP_DESCRIPTION

const ilIndividualAssessmentSettingsGUI::PROP_DESCRIPTION = "description"

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

◆ PROP_EVENT_TIME_PLACE_REQUIRED

const ilIndividualAssessmentSettingsGUI::PROP_EVENT_TIME_PLACE_REQUIRED = "event_time_place_required"

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

◆ PROP_FILE_REQUIRED

const ilIndividualAssessmentSettingsGUI::PROP_FILE_REQUIRED = "file_required"

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

◆ PROP_INFO_CONSULTATION

const ilIndividualAssessmentSettingsGUI::PROP_INFO_CONSULTATION = "consultation"

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

◆ PROP_INFO_CONTACT

const ilIndividualAssessmentSettingsGUI::PROP_INFO_CONTACT = "contact"

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

◆ PROP_INFO_MAILS

const ilIndividualAssessmentSettingsGUI::PROP_INFO_MAILS = "mails"

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

◆ PROP_INFO_PHONE

const ilIndividualAssessmentSettingsGUI::PROP_INFO_PHONE = "phone"

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

◆ PROP_INFO_RESPONSIBILITY

const ilIndividualAssessmentSettingsGUI::PROP_INFO_RESPONSIBILITY = "responsibility"

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

◆ PROP_RECORD_TEMPLATE

const ilIndividualAssessmentSettingsGUI::PROP_RECORD_TEMPLATE = "record_template"

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

◆ PROP_TITLE

const ilIndividualAssessmentSettingsGUI::PROP_TITLE = "title"

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

◆ TAB_EDIT

const ilIndividualAssessmentSettingsGUI::TAB_EDIT = 'settings'

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

◆ TAB_EDIT_INFO

const ilIndividualAssessmentSettingsGUI::TAB_EDIT_INFO = 'infoSettings'

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


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