5 declare(strict_types=1);
127 $next_class = $this->ctrl->getNextClass($this);
128 $cmd = $this->ctrl->getCmd();
130 switch ($next_class) {
133 case self::CMD_SHOW_DEADLINE_CONFIG:
136 case self::CMD_CHANGE_DEADLINE:
143 throw new Exception(
'Unknown command ' . $cmd);
152 $this->tpl->loadStandardTemplate();
153 $this->ctrl->setParameter($this,
'prgrs_ids', implode(
',', $this->
getProgressIds()));
154 $action = $this->ctrl->getFormAction(
156 self::CMD_CHANGE_DEADLINE
158 $this->ctrl->clearParameters($this);
162 $this->tpl->setContent($this->renderer->render($form));
167 $ff = $this->input_factory->field();
168 $txt =
function ($id) {
169 return $this->lng->txt($id);
172 return $this->input_factory->container()->form()->standard(
184 $ff = $this->input_factory->field();
185 $txt =
function ($id) {
186 return $this->lng->txt($id);
190 $deadline_date = $prg->
getSettings()->getDeadlineSettings()->getDeadlineDate();
191 $format = $this->data_factory->dateFormat()->germanShort();
192 $deadline_date_sub_form = $ff
193 ->dateTime(
'',
$txt(
'prg_deadline_date_desc'))
197 if ($deadline_date !== null) {
198 $deadline_date_sub_form = $deadline_date_sub_form->withValue(
199 $deadline_date->format(
$format->toString())
204 $sg = $ff->switchableGroup(
207 $ff->group([],
$txt(
'prg_no_deadline')),
209 $ff->group([$deadline_date_sub_form],
$txt(
'prg_deadline_date'))
214 return $sg->withValue($option);
227 $txt(
"prg_deadline_settings"),
238 ->buildForm($this->
getObject(), $this->ctrl->getFormAction($this,
"changeDeadline"))
239 ->withRequest($this->request);
241 $result = $form->getInputGroup()->getContent();
243 $msg_collection = $this->messages->getMessageCollection(
'msg_change_deadline_date');
248 $acting_usr_id = $this->
user->getId();
250 $deadline_data = $values[0][self::PROP_DEADLINE];
251 $deadline_type = $deadline_data[0];
254 $deadline = DateTimeImmutable::createFromFormat(
256 array_shift($deadline_data[1])
261 $this->ctrl->redirectByClass(self::class, self::CMD_SHOW_DEADLINE_CONFIG);
266 $programme->changeProgressDeadline($progress_id, $acting_usr_id, $msg_collection, $deadline);
269 $this->messages->showMessages($msg_collection);
270 $this->ctrl->redirectByClass(
'ilObjStudyProgrammeMembersGUI',
'view');
274 $this->ctrl->redirectByClass(self::class, self::CMD_SHOW_DEADLINE_CONFIG);
284 $this->back_target = $target;
294 $this->progress_ids = array_map(
'intval', $progress_ids);
309 if ($this->
object === null) {
An entity that renders components to a string output.
This class provides processing control methods.
getDeadlineSubForm(ilObjStudyProgramme $prg)
const CMD_CHANGE_DEADLINE
Util around ilPRGMessageCollection factors and output collections.
Class ChatMainBarProvider .
buildForm(ilObjStudyProgramme $prg, string $submit_action)
static getInstanceByRefId($a_ref_id)
buildFormElements( $ff, Closure $txt, ilObjStudyProgramme $prg)
__construct(ilCtrl $ctrl, ilGlobalTemplateInterface $tpl, ilLanguage $lng, ilAccess $access, ilObjUser $user, Factory $input_factory, Renderer $renderer, ServerRequest $request, \ILIAS\Refinery\Factory $refinery_factory, \ILIAS\Data\Factory $data_factory, ilPRGMessagePrinter $messages)
setProgressIds(array $progress_ids)
static sendFailure($a_info="", $a_keep=false)
Send Failure Message to Screen.
const CMD_SHOW_DEADLINE_CONFIG
setBackTarget(string $target)
static redirect($a_script)