19 declare(strict_types=1);
32 if (!is_null($deadline_period) && 0 > $deadline_period) {
47 if (!is_null($deadline_period) && 0 > $deadline_period) {
74 $format = $data_factory->
dateFormat()->germanShort();
76 $grp1 = $input->group([], $lng->
txt(
'prg_no_deadline'));
77 $grp2 = $input->group(
79 'deadline_period' => $input->numeric(
80 $lng->
txt(
'prg_deadline_period_label'),
81 $lng->
txt(
'prg_deadline_period_desc')
86 $lng->
txt(
'prg_deadline_period')
88 $grp3 = $input->group(
90 'deadline_date' => $input->dateTime(
91 $lng->
txt(
'prg_deadline_date_label'),
92 $lng->
txt(
'prg_deadline_date_desc')
98 $lng->
txt(
'prg_deadline_date')
101 $sg = $input->switchableGroup(
103 'opt_no_deadline' => $grp1,
104 'opt_deadline_period' => $grp2,
105 'opt_deadline_date' => $grp3
110 $deadline =
"opt_no_deadline";
112 $deadline =
'opt_deadline_period';
116 $deadline =
'opt_deadline_date';
119 return $input->section(
120 [
'prg_deadline' => $sg->withValue($deadline)],
121 $lng->
txt(
'prg_deadline_settings')
128 if (isset($vals[
'prg_deadline'][1][
'deadline_period'])) {
129 $period = (
int) $vals[
'prg_deadline'][1][
'deadline_period'];
132 if (isset($vals[
'prg_deadline'][1][
'deadline_date'])) {
133 $date = $vals[
'prg_deadline'][1][
'deadline_date'];
DateTimeImmutable $deadline_date
toFormInput(Field\Factory $input, ilLanguage $lng, Refinery $refinery, Factory $data_factory)
txt(string $a_topic, string $a_default_lang_fallback_mod="")
gets the text for a given topic if the topic is not in the list, the topic itself with "-" will be re...
Interface Observer Contains several chained tasks and infos about them.
withDeadlinePeriod(?int $deadline_period)
while($session_entry=$r->fetchRow(ilDBConstants::FETCHMODE_ASSOC)) return null
__construct(?int $deadline_period, ?DateTimeImmutable $deadline_date)
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
withDeadlineDate(?DateTimeImmutable $deadline_date)