ILIAS  release_5-3 Revision v5.3.23-19-g915713cf615
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 = "consultatilon"
 
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 ()
 
 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

◆ cancel()

ilIndividualAssessmentSettingsGUI::cancel ( )
protected

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

69  {
70  $this->ctrl->redirect($this->parent_gui);
71  }

◆ edit()

ilIndividualAssessmentSettingsGUI::edit ( )
protected

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

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

74  {
75  $this->tabs_gui->setSubTabActive(self::TAB_EDIT);
76  $form = $this->fillForm($this->initSettingsForm(), $this->object, $this->object->getSettings());
77  $this->renderForm($form);
78  }
fillForm(ilPropertyFormGUI $a_form, ilObjIndividualAssessment $iass, ilIndividualAssessmentSettings $settings)
if(isset($_POST['submit'])) $form
Create new PHPExcel object
obj_idprivate
+ Here is the call graph for this function:

◆ editInfo()

ilIndividualAssessmentSettingsGUI::editInfo ( )
protected

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

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

81  {
82  $this->tabs_gui->setSubTabActive(self::TAB_EDIT_INFO);
83  $form = $this->fillInfoForm($this->initInfoSettingsForm(), $this->object->getInfoSettings());
84  $this->renderForm($form);
85  }
fillInfoForm(ilPropertyFormGUI $a_form, ilIndividualAssessmentInfoSettings $settings)
if(isset($_POST['submit'])) $form
Create new PHPExcel object
obj_idprivate
+ Here is the call graph for this function:

◆ executeCommand()

ilIndividualAssessmentSettingsGUI::executeCommand ( )

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

51  {
52  $cmd = $this->ctrl->getCmd();
53  switch ($cmd) {
54  case 'edit':
55  case 'update':
56  case 'cancel':
57  case 'editInfo':
58  case 'updateInfo':
59  if (!$this->iass_access->mayEditObject()) {
60  $this->parent_gui->handleAccessViolation();
61  }
62  $this->$cmd();
63  break;
64  }
65  }

◆ fillForm()

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

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

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

Referenced by edit().

230  {
231  $a_form->setValuesByArray(array(
232  self::PROP_TITLE => $iass->getTitle()
233  , self::PROP_DESCRIPTION => $iass->getDescription()
234  , self::PROP_CONTENT => $settings->content()
235  , self::PROP_RECORD_TEMPLATE => $settings->recordTemplate()
236  , self::PROP_EVENT_TIME_PLACE_REQUIRED => $settings->eventTimePlaceRequired()
237  , self::PROP_FILE_REQUIRED => $settings->fileRequired()
238  , ilObjectServiceSettingsGUI::ORGU_POSITION_ACCESS => (bool) ilOrgUnitGlobalSettings::getInstance()->isPositionAccessActiveForObject($iass->getId())
239  ));
240  return $a_form;
241  }
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.
Create styles array
The data for the language used.
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:

◆ fillInfoForm()

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

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

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

Referenced by editInfo().

218  {
219  $a_form->setValuesByArray(array(
220  self::PROP_INFO_CONTACT => $settings->contact()
221  , self::PROP_INFO_RESPONSIBILITY => $settings->responsibility()
222  , self::PROP_INFO_PHONE => $settings->phone()
223  , self::PROP_INFO_MAILS => $settings->mails()
224  , self::PROP_INFO_CONSULTATION => $settings->consultationHours()
225  ));
226  return $a_form;
227  }
Create styles array
The data for the language used.
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 36 of file class.ilIndividualAssessmentSettingsGUI.php.

References ilTabsGUI\addSubTab().

37  {
38  $tabs->addSubTab(
39  self::TAB_EDIT,
40  $this->lng->txt("edit"),
41  $this->ctrl->getLinkTarget($this, 'edit')
42  );
43  $tabs->addSubTab(
44  self::TAB_EDIT_INFO,
45  $this->lng->txt("iass_edit_info"),
46  $this->ctrl->getLinkTarget($this, 'editInfo')
47  );
48  }
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 185 of file class.ilIndividualAssessmentSettingsGUI.php.

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

Referenced by editInfo(), and updateInfo().

186  {
187  include_once("Services/Form/classes/class.ilPropertyFormGUI.php");
188  $form = new ilPropertyFormGUI();
189  $form->setFormAction($this->ctrl->getFormAction($this));
190  $form->setTitle($this->lng->txt('iass_edit_info'));
191 
192  $ti = new ilTextInputGUI($this->lng->txt('iass_contact'), self::PROP_INFO_CONTACT);
193  $ti->setSize(40);
194  $form->addItem($ti);
195 
196  $ti = new ilTextInputGUI($this->lng->txt('iass_responsibility'), self::PROP_INFO_RESPONSIBILITY);
197  $ti->setSize(40);
198  $form->addItem($ti);
199 
200  $ti = new ilTextInputGUI($this->lng->txt('iass_phone'), self::PROP_INFO_PHONE);
201  $ti->setSize(40);
202  $form->addItem($ti);
203 
204  $ti = new ilTextInputGUI($this->lng->txt('iass_mails'), self::PROP_INFO_MAILS);
205  $ti->setInfo($this->lng->txt('iass_info_emails_expl'));
206  $ti->setSize(300);
207  $form->addItem($ti);
208 
209  $item = new ilTextAreaInputGUI($this->lng->txt('iass_consultation_hours'), self::PROP_INFO_CONSULTATION);
210  $form->addItem($item);
211 
212  $form->addCommandButton('updateInfo', $this->lng->txt('save'));
213  $form->addCommandButton('cancel', $this->lng->txt('cancel'));
214  return $form;
215  }
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 134 of file class.ilIndividualAssessmentSettingsGUI.php.

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

Referenced by edit(), and update().

135  {
136  $form = new ilPropertyFormGUI();
137  $form->setFormAction($this->ctrl->getFormAction($this));
138  $form->setTitle($this->lng->txt('iass_edit'));
139 
140  // title
141  $ti = new ilTextInputGUI($this->lng->txt('title'), self::PROP_TITLE);
142  $ti->setSize(40);
143  $ti->setRequired(true);
144  $form->addItem($ti);
145 
146  // description
147  $ta = new ilTextAreaInputGUI($this->lng->txt('description'), self::PROP_DESCRIPTION);
148  $ta->setCols(40);
149  $ta->setRows(2);
150  $form->addItem($ta);
151 
152 
153  $item = new ilTextAreaInputGUI($this->lng->txt('iass_content'), self::PROP_CONTENT);
154  $item->setInfo($this->lng->txt('iass_content_explanation'));
155  $form->addItem($item);
156 
157  $item = new ilTextAreaInputGUI($this->lng->txt('iass_record_template'), self::PROP_RECORD_TEMPLATE);
158  $item->setInfo($this->lng->txt('iass_record_template_explanation'));
159  $form->addItem($item);
160 
161  $option = new ilCheckboxInputGUI($this->lng->txt('iass_event_time_place_required'), self::PROP_EVENT_TIME_PLACE_REQUIRED);
162  $option->setInfo($this->lng->txt('iass_event_time_place_required_info'));
163  $form->addItem($option);
164 
165  $option = new ilCheckboxInputGUI($this->lng->txt('iass_file_required'), self::PROP_FILE_REQUIRED);
166  $option->setInfo($this->lng->txt('iass_file_required_info'));
167  $form->addItem($option);
168 
169  $form->addCommandButton('update', $this->lng->txt('save'));
170  $form->addCommandButton('cancel', $this->lng->txt('cancel'));
171 
172  $sh = new ilFormSectionHeaderGUI();
173  $sh->setTitle($this->lng->txt("obj_features"));
174  $form->addItem($sh);
175 
177  $this->object->getId(),
178  $form,
180  );
181 
182  return $form;
183  }
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.
Create new PHPExcel object
obj_idprivate
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 105 of file class.ilIndividualAssessmentSettingsGUI.php.

References ilPropertyFormGUI\getHTML().

Referenced by edit(), editInfo(), update(), and updateInfo().

106  {
107  $this->tpl->setContent($a_form->getHTML());
108  }
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ update()

ilIndividualAssessmentSettingsGUI::update ( )
protected

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

References $_POST, $form, initSettingsForm(), object, ilObjectServiceSettingsGUI\ORGU_POSITION_ACCESS, renderForm(), ilUtil\sendSuccess(), and ilObjectServiceSettingsGUI\updateServiceSettingsForm().

111  {
112  $this->tabs_gui->setSubTabActive(self::TAB_EDIT);
113  $form = $this->initSettingsForm();
114  $form->setValuesByArray($_POST);
115  if ($form->checkInput()) {
116  $this->object->setTitle($_POST[self::PROP_TITLE]);
117  $this->object->setDescription($_POST[self::PROP_DESCRIPTION]);
118  $this->object->getSettings()->setContent($_POST[self::PROP_CONTENT])
119  ->setRecordTemplate($_POST[self::PROP_RECORD_TEMPLATE])
120  ->setEventTimePlaceRequired((bool) $_POST[self::PROP_EVENT_TIME_PLACE_REQUIRED])
121  ->setFileRequired((bool) $_POST[self::PROP_FILE_REQUIRED]);
122  $this->object->update();
124  $this->object->getId(),
125  $form,
127  );
128  ilUtil::sendSuccess($this->lng->txt('iass_settings_saved'));
129  }
130  $this->renderForm($form);
131  }
static sendSuccess($a_info="", $a_keep=false)
Send Success Message to Screen.
if(isset($_POST['submit'])) $form
static updateServiceSettingsForm($a_obj_id, ilPropertyFormGUI $form, $services)
Update service settings.
Create new PHPExcel object
obj_idprivate
$_POST["username"]
+ Here is the call graph for this function:

◆ updateInfo()

ilIndividualAssessmentSettingsGUI::updateInfo ( )
protected

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

References $_POST, $form, initInfoSettingsForm(), renderForm(), and ilUtil\sendSuccess().

88  {
89  $this->tabs_gui->setSubTabActive(self::TAB_EDIT_INFO);
90  $form = $this->initInfoSettingsForm();
91  $form->setValuesByArray($_POST);
92  if ($form->checkInput()) {
93  $this->object->getInfoSettings()
94  ->setContact($_POST[self::PROP_INFO_CONTACT])
95  ->setResponsibility($_POST[self::PROP_INFO_RESPONSIBILITY])
96  ->setPhone($_POST[self::PROP_INFO_PHONE])
97  ->setMails($_POST[self::PROP_INFO_MAILS])
98  ->setConsultationHours($_POST[self::PROP_INFO_CONSULTATION]);
99  $this->object->updateInfo();
100  ilUtil::sendSuccess($this->lng->txt('iass_settings_saved'));
101  }
102  $this->renderForm($form);
103  }
static sendSuccess($a_info="", $a_keep=false)
Send Success Message to Screen.
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 = "consultatilon"

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: