19 declare(strict_types=1);
47 private readonly
ilCtrl $ctrl,
58 $this->poolOBJ = $poolGUI->getObject();
68 if (!$this->
access->checkAccess(
'write',
'', $this->poolGUI->getRefId())) {
69 $this->tpl->setOnScreenMessage(
'info', $this->
lng->txt(
'cannot_edit_question_pool'),
true);
70 $this->
ctrl->redirectByClass(
72 ilRepositoryGUI::class,
74 ilInfoScreenGUI::class
80 $this->
tabs->activateTab(
'settings');
81 $this->
tabs->activateSubTab(
'qpl_settings_subtab_general');
85 $nextClass = $this->
ctrl->getNextClass();
89 $cmd = $this->
ctrl->getCmd(self::CMD_SHOW_GENERAL_FORM) .
'Cmd';
96 $this->
tabs->activateSubTab(self::TAB_COMMON_SETTINGS);
100 $this->tpl->setContent($this->ui_renderer->render($form));
105 $form = $this->
buildForm()->withRequest($this->http_request);
106 $result = $form->getInputGroup()->getContent();
108 if (!$result->isOK()) {
115 $this->tpl->setOnScreenMessage(MessageBox::SUCCESS, $this->
lng->txt(
"msg_obj_modified"),
true);
116 $this->
ctrl->redirect($this, self::CMD_SHOW_GENERAL_FORM);
122 $title_and_description =
$data[
'general_settings'][
'title_and_description'] ??
null;
124 $this->poolOBJ->getObjectProperties()->storePropertyTitleAndDescription(
125 $title_and_description
129 $this->poolOBJ->getObjectProperties()->storePropertyIsOnline(
130 $data[
'availability'][
'online'] ?? $this->poolOBJ->getObjectProperties()->getPropertyIsOnline()->withOffline()
133 $display_settings =
$data[
'display_settings'] ?? [];
134 if (isset($display_settings[
'tile_image'])) {
135 $this->poolOBJ->getObjectProperties()->storePropertyTileImage($display_settings[
'tile_image']);
138 $this->poolOBJ->setSkillServiceEnabled(
$data[
'additional_features'][
'skill_service'] ??
false);
140 $this->poolOBJ->saveToDb();
147 $title_and_description = $this->poolOBJ->getObjectProperties()->getPropertyTitleAndDescription()->toForm(
149 $this->ui_factory->input()->field(),
153 $items[
'general_settings'] = $this->ui_factory->input()->field()->section(
155 'title_and_description' => $title_and_description
157 $this->
lng->txt(
'qpl_form_general_settings')
160 $online = $this->poolOBJ->getObjectProperties()->getPropertyIsOnline()->toForm(
162 $this->ui_factory->input()->field(),
165 $availability = $this->ui_factory->input()->field()->section(
166 [
'online' => $online],
167 $this->
lng->txt(
'qpl_settings_availability')
169 $items[
'availability'] = $availability;
171 $timg = $this->poolOBJ->getObjectProperties()->getPropertyTileImage()->toForm(
173 $this->ui_factory->input()->field(),
176 $items[
'display_settings'] = $this->ui_factory->input()->field()->section(
177 [
'tile_image' => $timg],
178 $this->
lng->txt(
'tst_presentation_settings_section')
181 $additional_features_inputs = [];
184 $additional_features_inputs[
'skill_service'] = $this->ui_factory->input()->field()->checkbox(
185 $this->
lng->txt(
'tst_activate_skill_service')
186 )->
withValue($this->poolOBJ->isSkillServiceEnabled());
189 $items[
'additional_features'] = $this->ui_factory->input()->field()->section(
190 $additional_features_inputs,
191 $this->
lng->txt(
'obj_features')
194 return $this->ui_factory->input()->container()->form()->standard(
195 $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.