3 declare(strict_types=1);
57 Psr\Http\Message\ServerRequestInterface $request,
77 $cmd = $this->
ctrl->getCmd();
80 case self::CMD_SHOW_EXPIRE_DATE_CONFIG:
83 case self::CMD_CHANGE_EXPIRE_DATE:
90 throw new Exception(
'Unknown command ' . $cmd);
96 $this->tpl->loadStandardTemplate();
98 $action = $this->
ctrl->getFormAction(
100 self::CMD_CHANGE_EXPIRE_DATE
102 $this->
ctrl->clearParameters($this);
106 $this->tpl->setContent($this->renderer->render($form));
111 $ff = $this->input_factory->field();
113 return $this->
lng->txt(
$id);
116 return $this->input_factory->container()->form()->standard(
128 $ff = $this->input_factory->field();
130 return $this->
lng->txt(
$id);
134 $format = $this->data_factory->dateFormat()->germanShort();
135 $vq_date_sub_form = $ff
136 ->dateTime(
'',
$txt(
'validity_qualification_date_desc'))
138 $date = $prg->
getSettings()->getValidityOfQualificationSettings()->getQualificationDate();
139 if ($date !== null) {
140 $vq_date_sub_form = $vq_date_sub_form->withValue($date->format(
$format->toString()));
144 $sg = $ff->switchableGroup(
147 $ff->group([],
$txt(
'prg_no_validity_qualification')),
149 $ff->group([$vq_date_sub_form],
$txt(
'validity_qualification_date'))
153 return $sg->withValue($option);
166 $txt(
"prg_validity_of_qualification"),
175 ->buildForm($this->
getObject(), $this->
ctrl->getFormAction($this,
"changeExpireDate"))
176 ->withRequest($this->request);
178 $result = $form->getInputGroup()->getContent();
180 $msg_collection = $this->messages->getMessageCollection(
'msg_change_expire_date');
182 if ($result->isOK()) {
183 $values = $result->value();
185 $acting_usr_id = $this->
user->getId();
187 $vq_data = $values[0][self::PROP_VALIDITY_OF_QUALIFICATION];
188 $vq_type = $vq_data[0];
191 $validity = array_shift($vq_data[1]);
193 $this->tpl->setOnScreenMessage(
"failure", $this->
lng->txt(
'error_updating_expire_date'),
true);
195 $this->
ctrl->redirectByClass(self::class, self::CMD_SHOW_EXPIRE_DATE_CONFIG);
199 $assignment_id = $progress_id->getAssignmentId();
200 $programme->changeProgressValidityDate($assignment_id, $acting_usr_id, $msg_collection, $validity, );
203 $this->messages->showMessages($msg_collection);
204 $this->
ctrl->redirectByClass(
'ilObjStudyProgrammeMembersGUI',
'view');
206 $this->tpl->setOnScreenMessage(
"failure", $this->
lng->txt(
'error_updating_expire_date'),
true);
208 $this->
ctrl->redirectByClass(self::class, self::CMD_SHOW_EXPIRE_DATE_CONFIG);
218 $this->back_target = $target;
244 if (is_null($ref_id)) {
245 throw new LogicException(
"Can't create object. No ref_id given.");
248 if ($this->
object === null) {
257 if (is_null($back_target)) {
258 throw new LogicException(
"Can't redirect. No back target given.");
261 $this->
ctrl->redirectToURL($back_target);
An entity that renders components to a string output.
__construct(ilCtrl $ctrl, ilGlobalTemplateInterface $tpl, ilLanguage $lng, ilAccess $access, ilObjUser $user, Factory $input_factory, Renderer $renderer, Psr\Http\Message\ServerRequestInterface $request, ILIAS\Refinery\Factory $refinery_factory, ILIAS\Data\Factory $data_factory, ilPRGMessagePrinter $messages)
getValidityOfQualificationSubForm(ilObjStudyProgramme $prg)
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
Class ChatMainBarProvider .
const OPT_NO_VALIDITY_OF_QUALIFICATION
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
static getInstanceByRefId($ref_id)
ILIAS Refinery Factory $refinery_factory
const OPT_VALIDITY_OF_QUALIFICATION_DATE
setProgressIds(array $progress_ids)
const CMD_CHANGE_EXPIRE_DATE
const CMD_SHOW_EXPIRE_DATE_CONFIG
const PROP_VALIDITY_OF_QUALIFICATION
setBackTarget(string $target)
buildFormElements(ILIAS\UI\Component\Input\Field\Factory $ff, Closure $txt, ilObjStudyProgramme $prg)
Psr Http Message ServerRequestInterface $request
ilPRGMessagePrinter $messages
$id
plugin.php for ilComponentBuildPluginInfoObjectiveTest::testAddPlugins
ILIAS Data Factory $data_factory
const PROP_VALIDITY_OF_QUALIFICATION
ilObjStudyProgramme $object
ilGlobalTemplateInterface $tpl
buildForm(ilObjStudyProgramme $prg, string $submit_action)