21 public function __construct($a_parent_gui, $a_ref_id)
24 $this->ctrl = $DIC[
'ilCtrl'];
25 $this->parent_gui = $a_parent_gui;
27 $this->
object = $a_parent_gui->object;
28 $this->ref_id = $a_ref_id;
29 $this->tpl = $DIC[
'tpl'];
30 $this->lng = $DIC[
'lng'];
31 $this->tabs_gui = $a_parent_gui->tabsGUI();
33 $this->iass_access = $this->
object->accessHandler();
34 $this->obj_service = $DIC->object();
36 $this->lng->loadLanguageModule(
'content');
37 $this->lng->loadLanguageModule(
'obj');
38 $this->lng->loadLanguageModule(
'cntr');
45 $this->lng->txt(
"edit"),
46 $this->ctrl->getLinkTarget($this,
'edit')
50 $this->lng->txt(
"iass_edit_info"),
51 $this->ctrl->getLinkTarget($this,
'editInfo')
57 $cmd = $this->ctrl->getCmd();
64 if (!$this->iass_access->mayEditObject()) {
65 $this->parent_gui->handleAccessViolation();
75 $this->ctrl->redirect($this->parent_gui);
80 $this->tabs_gui->setSubTabActive(self::TAB_EDIT);
88 $this->tabs_gui->setSubTabActive(self::TAB_EDIT_INFO);
95 $this->tabs_gui->setSubTabActive(self::TAB_EDIT_INFO);
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);
108 $this->ctrl->redirect($this,
"editInfo");
113 $this->tpl->setContent($a_form->
getHTML());
118 $this->tabs_gui->setSubTabActive(self::TAB_EDIT);
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(),
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);
145 $this->ctrl->redirect($this,
"edit");
152 $form->setFormAction($this->ctrl->getFormAction($this));
153 $form->setTitle($this->lng->txt(
'iass_edit'));
156 $ti =
new ilTextInputGUI($this->lng->txt(
'title'), self::PROP_TITLE);
158 $ti->setRequired(
true);
169 $item->
setInfo($this->lng->txt(
'iass_content_explanation'));
170 $form->addItem($item);
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);
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);
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);
184 $form->addCommandButton(
'update', $this->lng->txt(
'save'));
185 $form->addCommandButton(
'cancel', $this->lng->txt(
'cancel'));
188 $sh->setTitle($this->lng->txt(
"obj_features"));
192 $this->object->getId(),
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();
217 include_once(
"Services/Form/classes/class.ilPropertyFormGUI.php");
219 $form->setFormAction($this->ctrl->getFormAction($this));
220 $form->setTitle($this->lng->txt(
'iass_edit_info'));
222 $ti =
new ilTextInputGUI($this->lng->txt(
'iass_contact'), self::PROP_INFO_CONTACT);
226 $ti =
new ilTextInputGUI($this->lng->txt(
'iass_responsibility'), self::PROP_INFO_RESPONSIBILITY);
230 $ti =
new ilTextInputGUI($this->lng->txt(
'iass_phone'), self::PROP_INFO_PHONE);
234 $ti =
new ilTextInputGUI($this->lng->txt(
'iass_mails'), self::PROP_INFO_MAILS);
235 $ti->
setInfo($this->lng->txt(
'iass_info_emails_expl'));
239 $item =
new ilTextAreaInputGUI($this->lng->txt(
'iass_consultation_hours'), self::PROP_INFO_CONSULTATION);
240 $form->addItem($item);
242 $form->addCommandButton(
'updateInfo', $this->lng->txt(
'save'));
243 $form->addCommandButton(
'cancel', $this->lng->txt(
'cancel'));
250 self::PROP_INFO_CONTACT => $settings->
contact()
252 , self::PROP_INFO_PHONE => $settings->
phone()
253 , self::PROP_INFO_MAILS => $settings->
mails()
262 self::PROP_TITLE => $iass->
getTitle()
264 , self::PROP_CONTENT => $settings->
content()
270 $this->object->getId(),
For the purpose of streamlining the grading and learning-process status definition outside of tests...
fillForm(ilPropertyFormGUI $a_form, ilObjIndividualAssessment $iass, ilIndividualAssessmentSettings $settings)
An object carrying settings of an Individual Assessment obj beyond the standart information.
eventTimePlaceRequired()
Get the value of the checkbox event_time_place_require.
A simple carrier for iass info-settings.
fillInfoForm(ilPropertyFormGUI $a_form, ilIndividualAssessmentInfoSettings $settings)
addCommonFieldsToForm(\ilPropertyFormGUI $form)
const PROP_EVENT_TIME_PLACE_REQUIRED
static getInstance()
Get instance.
recordTemplate()
Get the record template to be used as default record with corresponding object.
if(isset($_POST['submit'])) $form
getId()
get object id public
content()
Get the content of this assessment, e.g.
setSize($a_size)
Set Size.
This class represents a text property in a property form.
setCols($a_cols)
Set Cols.
getTitle()
get object title public
getDescription()
get object description
addSubTab($a_id, $a_text, $a_link, $a_frame="")
Add a Subtab.
fileRequired()
Get the value of the checkbox file_required.
static updateServiceSettingsForm($a_obj_id, ilPropertyFormGUI $form, $services)
Update service settings.
getSubTabs(ilTabsGUI $tabs)
const PROP_INFO_CONSULTATION
if(!empty($this->data['faventry'])) $tabs
const PROP_INFO_RESPONSIBILITY
This class represents a text area property in a property form.
static initServiceSettingsForm($a_obj_id, ilPropertyFormGUI $form, $services)
Init service settings form.
const ORGU_POSITION_ACCESS
renderForm(ilPropertyFormGUI $a_form)
static _lookupContainerSetting($a_id, $a_keyword, $a_default_value=null)
Lookup a container setting.
const PROP_RECORD_TEMPLATE