19 declare(strict_types=1);
82 $this->
ctrl = $ilCtrl;
107 $next_class = $this->
ctrl->getNextClass();
108 switch ($next_class) {
109 case 'ilstudyprogrammecommonsettingsgui':
110 $this->
tabs->activateSubTab(self::TAB_COMMON_SETTINGS);
111 $this->common_settings_gui->setObject($this->
getObject());
112 $content = $this->
ctrl->forwardCommand($this->common_settings_gui);
115 $cmd = $this->
ctrl->getCmd();
116 if ($cmd ===
"" || $cmd === null) {
121 $content = $this->
view();
124 $content = $this->$cmd();
128 "ilObjStudyProgrammeSettingsGUI: Command not supported: $cmd" 133 $this->tpl->setContent($content);
136 protected function view(): string
138 $this->tmp_heading =
"<div class=''>" . $this->
lng->txt(
'prg_async_settings') .
"</div>";
140 return $this->renderer->render($form);
149 ->buildForm($this->
getObject(), $this->
ctrl->getFormAction($this,
"update"))
150 ->withRequest($this->request);
152 $result = $form->getInputGroup()->getContent();
154 if ($result->isOK()) {
155 $result->value()->update();
156 $this->tpl->setOnScreenMessage(
"success", $this->
lng->txt(
"msg_obj_modified"),
true);
157 $this->
ctrl->redirect($this);
159 $this->tpl->setOnScreenMessage(
"failure", $this->
lng->txt(
"msg_form_save_error"));
160 return $this->renderer->render($form);
166 string $submit_action
169 $ff = $this->input_factory->field();
170 $sp_types = $this->type_repository->getAllTypesArray();
173 return $this->input_factory->container()->form()->standard(
181 )->withAdditionalTransformation(
182 $this->refinery_factory->custom()->transformation(
183 function ($values) use ($prg) {
184 $object_data = $values[0];
185 $prg->
setTitle($object_data[self::PROP_TITLE]);
189 ->withAssessmentSettings($values[
'prg_assessment'])
190 ->withDeadlineSettings($values[
'prg_deadline'])
191 ->withValidityOfQualificationSettings($values[
'prg_validity_of_qualification'])
192 ->withAutoMailSettings($values[
'automail_settings'])
193 ->withTypeSettings($values[
'prg_type']);
211 "prg_type" => $settings
213 ->toFormInput($ff, $this->
lng, $this->refinery_factory, $sp_types)
215 "prg_assessment" => $settings
217 ->toFormInput($ff, $this->
lng, $this->refinery_factory)
219 "prg_deadline" => $settings
221 ->toFormInput($ff, $this->
lng, $this->refinery_factory, $this->data_factory)
223 "prg_validity_of_qualification" => $settings
225 ->toFormInput($ff, $this->
lng, $this->refinery_factory, $this->data_factory)
227 "automail_settings" => $settings
229 ->toFormInput($ff, $this->
lng, $this->refinery_factory)
240 foreach ($this->lom_services->dataHelper()->getAllLanguages() as $language) {
242 $lang = $language->presentableLabel();
248 $ff->text($this->txt(
"title"))
250 ->withRequired(
true),
252 $ff->textarea($this->
txt(
"description"))
255 $this->
txt(
"prg_edit"),
256 $this->
txt(
"language") .
": " . $lang .
257 ' <a href="' . $this->
ctrl->getLinkTargetByClass(
"ilobjecttranslationgui",
"") .
258 '">» ' . $this->
txt(
"obj_more_translations") .
'</a>' 264 if ($this->
object === null) {
270 protected function txt(
string $code): string
272 return $this->
lng->txt($code);
ILIAS HTTP Wrapper RequestWrapper $request_wrapper
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
Interface Observer Contains several chained tasks and infos about them.
const OPT_VALIDITY_OF_QUALIFICATION_PERIOD
const OPT_NO_VALIDITY_OF_QUALIFICATION
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
ilObjStudyProgramme $object
static getInstanceByRefId($ref_id)
buildForm(ilObjStudyProgramme $prg, string $submit_action)
loadLanguageModule(string $a_module)
Load language module.
const OPT_VALIDITY_OF_QUALIFICATION_DATE
buildFormElements(InputFieldFactory $ff, ilObjectTranslation $trans, array $sp_types, ilStudyProgrammeSettings $settings)
Psr Http Message ServerRequestInterface $request
ilStudyProgrammeTypeRepository $type_repository
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
ILIAS UI Renderer $renderer
ilStudyProgrammeCommonSettingsGUI $common_settings_gui
ilGlobalTemplateInterface $tpl
getValidityOfQualificationSettings()
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...
__construct(ilGlobalTemplateInterface $tpl, ilCtrl $ilCtrl, ilLanguage $lng, Factory $input_factory, Renderer $renderer, Psr\Http\Message\ServerRequestInterface $request, ILIAS\Refinery\Factory $refinery_factory, ILIAS\Data\Factory $data_factory, ilStudyProgrammeTypeRepository $type_repository, ilStudyProgrammeCommonSettingsGUI $common_settings_gui, ilTabsGUI $tabs, ILIAS\HTTP\Wrapper\RequestWrapper $request_wrapper, LOMServices $lom_services)
const TAB_COMMON_SETTINGS
ILIAS Refinery Factory $refinery_factory
LOMServices $lom_services
const OPT_DEADLINE_PERIOD
const PROP_VALIDITY_OF_QUALIFICATION
ILIAS Data Factory $data_factory
ILIAS UI Component Input Factory $input_factory
setDescription(string $description)
ilObjStudyProgrammeSettingsGUI: ilStudyProgrammeCommonSettingsGUI
updateSettings(ilStudyProgrammeSettings $settings)
getEditSection(InputFieldFactory $ff, ilObjectTranslation $trans)