19 declare(strict_types=1);
48 private readonly
ilCtrl $ctrl,
59 $this->poolOBJ = $poolGUI->getObject();
69 if (!$this->
access->checkAccess(
'write',
'', $this->poolGUI->getRefId())) {
70 $this->tpl->setOnScreenMessage(
'info', $this->
lng->txt(
'cannot_edit_question_pool'),
true);
71 $this->
ctrl->redirectByClass(
73 ilRepositoryGUI::class,
75 ilInfoScreenGUI::class
81 $this->
tabs->activateTab(
'settings');
82 $this->
tabs->activateSubTab(
'qpl_settings_subtab_general');
86 $nextClass = $this->
ctrl->getNextClass();
90 $cmd = $this->
ctrl->getCmd(self::CMD_SHOW_GENERAL_FORM) .
'Cmd';
97 $this->
tabs->activateSubTab(self::TAB_COMMON_SETTINGS);
101 $this->tpl->setContent($this->ui_renderer->render($form));
106 $form = $this->
buildForm()->withRequest($this->http_request);
107 $result = $form->getInputGroup()->getContent();
109 if (!$result->isOK()) {
116 $this->tpl->setOnScreenMessage(MessageBox::SUCCESS, $this->
lng->txt(
"msg_obj_modified"),
true);
117 $this->
ctrl->redirect($this, self::CMD_SHOW_GENERAL_FORM);
123 $title_and_description =
$data[
'general_settings'][
'title_and_description'] ??
null;
125 $this->poolOBJ->getObjectProperties()->storePropertyTitleAndDescription(
126 $title_and_description
130 $this->poolOBJ->getObjectProperties()->storePropertyIsOnline(
131 $data[
'availability'][
'online'] ?? $this->poolOBJ->getObjectProperties()->getPropertyIsOnline()->withOffline()
134 $display_settings =
$data[
'display_settings'] ?? [];
135 if (isset($display_settings[
'tile_image'])) {
136 $this->poolOBJ->getObjectProperties()->storePropertyTileImage($display_settings[
'tile_image']);
139 $this->poolOBJ->setSkillServiceEnabled(
$data[
'additional_features'][
'skill_service'] ??
false);
141 $this->poolOBJ->saveToDb();
148 $title_and_description = $this->poolOBJ->getObjectProperties()->getPropertyTitleAndDescription()->toForm(
150 $this->ui_factory->input()->field(),
154 $items[
'general_settings'] = $this->ui_factory->input()->field()->section(
156 'title_and_description' => $title_and_description
158 $this->
lng->txt(
'qpl_form_general_settings')
161 $online = $this->poolOBJ->getObjectProperties()->getPropertyIsOnline()->toForm(
163 $this->ui_factory->input()->field(),
166 $availability = $this->ui_factory->input()->field()->section(
167 [
'online' => $online],
168 $this->
lng->txt(
'qpl_settings_availability')
170 $items[
'availability'] = $availability;
172 $timg = $this->poolOBJ->getObjectProperties()->getPropertyTileImage()->toForm(
174 $this->ui_factory->input()->field(),
177 $items[
'display_settings'] = $this->ui_factory->input()->field()->section(
178 [
'tile_image' => $timg],
179 $this->
lng->txt(
'tst_presentation_settings_section')
182 $additional_features_inputs = [];
185 $additional_features_inputs[
'skill_service'] = $this->ui_factory->input()->field()->checkbox(
186 $this->
lng->txt(
'tst_activate_skill_service')
187 )->
withValue($this->poolOBJ->isSkillServiceEnabled());
190 $items[
'additional_features'] = $this->ui_factory->input()->field()->section(
191 $additional_features_inputs,
192 $this->
lng->txt(
'obj_features')
195 return $this->ui_factory->input()->container()->form()->standard(
196 $this->
ctrl->getFormAction($this, self::CMD_SAVE_GENERAL_FORM),
showFormCmd(?Form $form=null)
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
const CMD_SAVE_GENERAL_FORM
__construct(private readonly ilCtrl $ctrl, private readonly ilAccessHandler $access, private readonly ilLanguage $lng, private readonly ilGlobalTemplateInterface $tpl, private readonly ilTabsGUI $tabs, private readonly ilObjQuestionPoolGUI $poolGUI, private readonly Refinery $refinery, private readonly UIFactory $ui_factory, private readonly UIRenderer $ui_renderer, private readonly HttpRequest $http_request,)
const TAB_COMMON_SETTINGS
while($session_entry=$r->fetchRow(ilDBConstants::FETCHMODE_ASSOC)) return null
The progress of the process/task cannot be calculated (yet), but it has started processing.
const CMD_SHOW_GENERAL_FORM
ilObjQuestionPool ilObject $poolOBJ
Class ilObjQuestionPoolGUI.
static isSkillManagementGloballyActivated()
executeCommand()
Command Execution.