19 declare(strict_types=1);
83 $this->
ctrl = $ilCtrl;
108 $next_class = $this->
ctrl->getNextClass();
109 switch ($next_class) {
110 case 'ilstudyprogrammecommonsettingsgui':
111 $this->
tabs->activateSubTab(self::TAB_COMMON_SETTINGS);
112 $this->common_settings_gui->setObject($this->
getObject());
113 $content = $this->
ctrl->forwardCommand($this->common_settings_gui);
116 $cmd = $this->
ctrl->getCmd();
117 if ($cmd ===
"" || $cmd ===
null) {
122 $content = $this->
view();
125 $content = $this->$cmd();
129 "ilObjStudyProgrammeSettingsGUI: Command not supported: $cmd" 134 $this->tpl->setContent($content);
137 protected function view(): string
139 $this->tmp_heading =
"<div class=''>" . $this->
lng->txt(
'prg_async_settings') .
"</div>";
141 return $this->
renderer->render($form);
150 ->buildForm($this->
getObject(), $this->
ctrl->getFormAction($this,
"update"))
151 ->withRequest($this->request);
153 $result = $form->getInputGroup()->getContent();
155 if ($result->isOK()) {
156 $result->value()->update();
157 $this->tpl->setOnScreenMessage(
"success", $this->
lng->txt(
"msg_obj_modified"),
true);
158 $this->
ctrl->redirect($this);
160 $this->tpl->setOnScreenMessage(
"failure", $this->
lng->txt(
"msg_form_save_error"));
161 return $this->
renderer->render($form);
167 string $submit_action
170 $ff = $this->input_factory->field();
171 $sp_types = $this->type_repository->getAllTypesArray();
174 return $this->input_factory->container()->form()->standard(
182 )->withAdditionalTransformation(
183 $this->refinery_factory->custom()->transformation(
184 function ($values) use ($prg) {
185 $object_data = $values[0];
186 $prg->
setTitle($object_data[self::PROP_TITLE]);
190 ->withAssessmentSettings($values[
'prg_assessment'])
191 ->withDeadlineSettings($values[
'prg_deadline'])
192 ->withValidityOfQualificationSettings($values[
'prg_validity_of_qualification'])
193 ->withAutoMailSettings($values[
'automail_settings'])
194 ->withTypeSettings($values[
'prg_type']);
212 "prg_type" => $settings
214 ->toFormInput($ff, $this->
lng, $this->refinery_factory, $sp_types)
216 "prg_assessment" => $settings
218 ->toFormInput($ff, $this->
lng, $this->refinery_factory)
220 "prg_deadline" => $settings
222 ->toFormInput($ff, $this->
lng, $this->refinery_factory, $this->data_factory)
224 "prg_validity_of_qualification" => $settings
226 ->toFormInput($ff, $this->
lng, $this->refinery_factory, $this->data_factory)
228 "automail_settings" => $settings
230 ->toFormInput($ff, $this->
lng, $this->refinery_factory)
241 foreach ($this->lom_services->dataHelper()->getAllLanguages() as $language) {
243 $lang = $language->presentableLabel();
249 $ff->text($this->txt(
"title"))
251 ->withRequired(
true),
253 $ff->textarea($this->
txt(
"description"))
256 $this->
txt(
"prg_edit"),
257 $this->
txt(
"language") .
": " .
$lang .
258 ' <a href="' . $this->
ctrl->getLinkTargetByClass(TranslationGUI::class,
"") .
259 '">» ' . $this->
txt(
"obj_more_translations") .
'</a>' 265 if ($this->
object ===
null) {
271 protected function txt(
string $code): string
273 return $this->
lng->txt($code);
ILIAS HTTP Wrapper RequestWrapper $request_wrapper
getEditSection(InputFieldFactory $ff, Translations $trans)
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
Class handles translation mode for an object.
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
Psr Http Message ServerRequestInterface $request
ilStudyProgrammeTypeRepository $type_repository
Covers the persistence of sp-type related information.
ILIAS UI Renderer $renderer
while($session_entry=$r->fetchRow(ilDBConstants::FETCHMODE_ASSOC)) return null
ilStudyProgrammeCommonSettingsGUI $common_settings_gui
ilGlobalTemplateInterface $tpl
buildFormElements(InputFieldFactory $ff, Translations $trans, array $sp_types, ilStudyProgrammeSettings $settings)
getValidityOfQualificationSettings()
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
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
updateSettings(ilStudyProgrammeSettings $settings)