3 declare(strict_types=1);
72 $this->iass_access = $this->
object->accessHandler();
83 $this->
lng->loadLanguageModule(
'content');
84 $this->
lng->loadLanguageModule(
'obj');
85 $this->
lng->loadLanguageModule(
'cntr');
92 $this->
lng->txt(
"edit"),
93 $this->
ctrl->getLinkTarget($this,
'edit')
96 self::TAB_COMMON_SETTINGS,
97 $this->
lng->txt(
"obj_features"),
98 $this->
ctrl->getLinkTargetByClass(
101 ilIndividualAssessmentCommonSettingsGUI::class
108 $this->
lng->txt(
"iass_edit_info"),
109 $this->
ctrl->getLinkTarget($this,
'editInfo')
115 if (!$this->iass_access->mayEditObject()) {
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);
145 $settings = $this->
object->getSettings();
147 $this->input_factory->field(),
151 return $this->input_factory->container()->form()->standard(
152 $this->
ctrl->getFormAction($this,
"update"),
156 $this->
refinery->custom()->transformation(
function ($v) {
157 return array_shift($v);
162 protected function edit(): void
164 $this->tabs_gui->setSubTabActive(self::TAB_EDIT);
166 $this->tpl->setContent($this->ui_renderer->render($form));
172 $form = $form->withRequest($this->http_request);
178 $this->
object->update();
179 $this->tpl->setOnScreenMessage(
"success", $this->
lng->txt(
"settings_saved"),
true);
180 $this->
ctrl->redirect($this,
"edit");
182 $this->tpl->setContent($this->ui_renderer->render($form));
188 $this->tabs_gui->setSubTabActive(self::TAB_EDIT_INFO);
190 $this->tpl->setContent($this->ui_renderer->render($form));
196 $form = $form->withRequest($this->http_request);
198 $info_settings = $form->getData();
200 if (!is_null($info_settings)) {
201 $this->
object->setInfoSettings($info_settings);
202 $this->
object->updateInfo();
203 $this->
ctrl->redirect($this,
"editInfo");
205 $this->tpl->setContent($this->ui_renderer->render($form));
211 $info_settings = $this->
object->getInfoSettings();
212 $field = $info_settings->toFormInput(
213 $this->input_factory->field(),
217 return $this->input_factory->container()->form()->standard(
218 $this->
ctrl->getFormAction($this,
"updateInfo"),
222 $this->
refinery->custom()->transformation(
function ($v) {
223 return array_shift($v);
230 $this->error_object->raiseError($this->
lng->txt(
"msg_no_perm_read"), $this->error_object->WARNING);
An entity that renders components to a string output.
ilObjIndividualAssessment $object
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
IndividualAssessmentAccessHandler $iass_access
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
ilGlobalPageTemplate $tpl
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
addSubTab(string $a_id, string $a_text, string $a_link, string $a_frame="")
Input Factory $input_factory
ilErrorHandling $error_object
__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)
getSubTabs(ilTabsGUI $tabs)
ilIndividualAssessmentCommonSettingsGUI $common_settings_gui
Error Handling & global info handling uses PEAR error class.
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
ilIndividualAssessmentSettingsGUI: ilIndividualAssessmentCommonSettingsGUI
const TAB_COMMON_SETTINGS
Refinery Factory $refinery