21 $this->ctrl =
$DIC[
'ilCtrl'];
22 $this->parent_gui = $a_parent_gui;
23 $this->
object = $a_parent_gui->object;
24 $this->ref_id = $a_ref_id;
25 $this->tpl =
$DIC[
'tpl'];
26 $this->lng =
$DIC[
'lng'];
27 $this->tabs_gui = $a_parent_gui->tabsGUI();
33 $this->lng->txt(
"edit"),
34 $this->ctrl->getLinkTarget($this,
'edit'));
36 $this->lng->txt(
"iass_edit_info"),
37 $this->ctrl->getLinkTarget($this,
'editInfo'));
41 $cmd = $this->ctrl->getCmd();
48 if(!$this->object->accessHandler()->checkAccessToObj($this->object,
'write')) {
49 $this->parent_gui->handleAccessViolation();
58 $this->ctrl->redirect($this->parent_gui);
61 protected function edit() {
62 $this->tabs_gui->setSubTabActive(self::TAB_EDIT);
65 ,$this->object->getSettings());
70 $this->tabs_gui->setSubTabActive(self::TAB_EDIT_INFO);
72 ,$this->object->getInfoSettings());
77 $this->tabs_gui->setSubTabActive(self::TAB_EDIT_INFO);
79 $form->setValuesByArray(
$_POST);
80 if($form->checkInput()) {
81 $this->
object->getInfoSettings()
82 ->setContact(
$_POST[self::PROP_INFO_CONTACT])
83 ->setResponsibility(
$_POST[self::PROP_INFO_RESPONSIBILITY])
84 ->setPhone(
$_POST[self::PROP_INFO_PHONE])
85 ->setMails(
$_POST[self::PROP_INFO_MAILS])
86 ->setConsultationHours(
$_POST[self::PROP_INFO_CONSULTATION]);
87 $this->
object->updateInfo();
94 $this->tpl->setContent($a_form->
getHTML());
98 $this->tabs_gui->setSubTabActive(self::TAB_EDIT);
100 $form->setValuesByArray(
$_POST);
101 if($form->checkInput()) {
102 $this->
object->setTitle(
$_POST[self::PROP_TITLE]);
103 $this->
object->setDescription(
$_POST[self::PROP_DESCRIPTION]);
104 $this->
object->getSettings()->setContent(
$_POST[self::PROP_CONTENT])
105 ->setRecordTemplate(
$_POST[self::PROP_RECORD_TEMPLATE]);
106 $this->
object->update();
114 include_once(
"Services/Form/classes/class.ilPropertyFormGUI.php");
116 $form->setFormAction($this->ctrl->getFormAction($this));
117 $form->setTitle($this->lng->txt(
'iass_edit'));
120 $ti =
new ilTextInputGUI($this->lng->txt(
'title'), self::PROP_TITLE);
122 $ti->setRequired(
true);
133 $item->setInfo($this->lng->txt(
'iass_content_explanation'));
134 $form->addItem($item);
136 $item =
new ilTextAreaInputGUI($this->lng->txt(
'iass_record_template'), self::PROP_RECORD_TEMPLATE);
137 $item->setInfo($this->lng->txt(
'iass_record_template_explanation'));
138 $form->addItem($item);
140 $form->addCommandButton(
'update', $this->lng->txt(
'save'));
141 $form->addCommandButton(
'cancel', $this->lng->txt(
'cancel'));
146 include_once(
"Services/Form/classes/class.ilPropertyFormGUI.php");
148 $form->setFormAction($this->ctrl->getFormAction($this));
149 $form->setTitle($this->lng->txt(
'iass_edit_info'));
151 $ti =
new ilTextInputGUI($this->lng->txt(
'iass_contact'), self::PROP_INFO_CONTACT);
155 $ti =
new ilTextInputGUI($this->lng->txt(
'iass_responsibility'), self::PROP_INFO_RESPONSIBILITY);
159 $ti =
new ilTextInputGUI($this->lng->txt(
'iass_phone'), self::PROP_INFO_PHONE);
163 $ti =
new ilTextInputGUI($this->lng->txt(
'iass_mails'), self::PROP_INFO_MAILS);
164 $ti->setInfo($this->lng->txt(
'iass_info_emails_expl'));
168 $item =
new ilTextAreaInputGUI($this->lng->txt(
'iass_consultation_hours'), self::PROP_INFO_CONSULTATION);
169 $form->addItem($item);
171 $form->addCommandButton(
'updateInfo', $this->lng->txt(
'save'));
172 $form->addCommandButton(
'cancel', $this->lng->txt(
'cancel'));
178 self::PROP_INFO_CONTACT => $settings->
contact()
180 , self::PROP_INFO_PHONE => $settings->
phone()
181 , self::PROP_INFO_MAILS => $settings->
mails()
189 self::PROP_TITLE => $iass->
getTitle()
191 , self::PROP_CONTENT => $settings->
content()
An exception for terminatinating execution or to throw for unit testing.
A simple carrier for iass info-settings.
__construct($a_parent_gui, $a_ref_id)
renderForm(ilPropertyFormGUI $a_form)
const PROP_RECORD_TEMPLATE
getSubTabs(ilTabsGUI $tabs)
const PROP_INFO_RESPONSIBILITY
fillInfoForm(ilPropertyFormGUI $a_form, ilIndividualAssessmentInfoSettings $settings)
const PROP_INFO_CONSULTATION
fillForm(ilPropertyFormGUI $a_form, ilObjIndividualAssessment $iass, ilIndividualAssessmentSettings $settings)
An object carrying settings of an Individual Assessment obj beyond the standart information.
content()
Get the content of this assessment, e.g.
recordTemplate()
Get the record template to be used as default record with corresponding object.
For the purpose of streamlining the grading and learning-process status definition outside of tests,...
getDescription()
get object description
getTitle()
get object title @access public
addSubTab($a_id, $a_text, $a_link, $a_frame="")
Add a Subtab.
This class represents a text area property in a property form.
This class represents a text property in a property form.
static sendSuccess($a_info="", $a_keep=false)
Send Success Message to Screen.