18 declare(strict_types=1);
71 $this->iass_access = $this->
object->accessHandler();
73 $this->input_factory = $factory;
82 $this->
lng->loadLanguageModule(
'content');
83 $this->
lng->loadLanguageModule(
'obj');
84 $this->
lng->loadLanguageModule(
'cntr');
91 $this->
lng->txt(
"edit"),
92 $this->
ctrl->getLinkTarget($this,
'edit')
95 self::TAB_COMMON_SETTINGS,
96 $this->
lng->txt(
"obj_features"),
97 $this->
ctrl->getLinkTargetByClass(
100 ilIndividualAssessmentCommonSettingsGUI::class
107 $this->
lng->txt(
"iass_edit_info"),
108 $this->
ctrl->getLinkTarget($this,
'editInfo')
114 if (!$this->iass_access->mayEditObject()) {
117 $next_class = $this->
ctrl->getNextClass();
118 $cmd = $this->
ctrl->getCmd();
119 switch ($next_class) {
120 case 'ilindividualassessmentcommonsettingsgui':
121 $this->tabs_gui->activateSubTab(self::TAB_COMMON_SETTINGS);
122 $this->
ctrl->forwardCommand($this->common_settings_gui);
144 $settings = $this->
object->getSettings();
146 $this->input_factory->field(),
152 $online = $this->
object->getObjectProperties()->getPropertyIsOnline()->toForm(
154 $this->input_factory->field(),
157 $availability = $this->input_factory->field()->section(
159 $this->
lng->txt(
'iass_settings_availability')
161 $this->
refinery->custom()->transformation(
function ($v) {
162 return array_shift($v);
166 return $this->input_factory->container()->form()->standard(
167 $this->
ctrl->getFormAction($this,
"update"),
168 [$field, $availability]
172 protected function edit(): void
174 $this->tabs_gui->setSubTabActive(self::TAB_EDIT);
176 $this->tpl->setContent($this->ui_renderer->render($form));
182 $form = $form->withRequest($this->http_request);
187 $this->
object->setSettings(
$settings[0]);
188 $this->
object->update();
190 $this->
object->getObjectProperties()->storePropertyIsOnline(
$settings[1]);
192 $this->tpl->setOnScreenMessage(
"success", $this->
lng->txt(
"settings_saved"),
true);
193 $this->
ctrl->redirect($this,
"edit");
195 $this->tpl->setContent($this->ui_renderer->render($form));
201 $this->tabs_gui->setSubTabActive(self::TAB_EDIT_INFO);
203 $this->tpl->setContent($this->ui_renderer->render($form));
209 $form = $form->withRequest($this->http_request);
211 $info_settings = $form->getData();
213 if (!is_null($info_settings)) {
214 $this->
object->setInfoSettings($info_settings);
215 $this->
object->updateInfo();
216 $this->
ctrl->redirect($this,
"editInfo");
218 $this->tpl->setContent($this->ui_renderer->render($form));
224 $info_settings = $this->
object->getInfoSettings();
225 $field = $info_settings->toFormInput(
226 $this->input_factory->field(),
230 return $this->input_factory->container()->form()->standard(
231 $this->
ctrl->getFormAction($this,
"updateInfo"),
235 $this->
refinery->custom()->transformation(
function ($v) {
236 return array_shift($v);
243 $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
For the purpose of streamlining the grading and learning-process status definition outside of tests...
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
Mechanic regarding the access control and roles of an objet goes here.
addSubTab(string $a_id, string $a_text, string $a_link, string $a_frame="")
Input Factory $input_factory
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
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.
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