4declare(strict_types=1);
6use \ILIAS\UI\Component\Input\Field;
7use \ILIAS\Refinery\Factory as Refinery;
108 return !empty($this->file);
143 $clone = clone $this;
144 $clone->finalized = $finalize;
150 $clone = clone $this;
151 $clone->file =
$file;
157 DataFactory $data_factory,
160 array $grading_options,
161 bool $may_be_edited =
true,
162 bool $place_required =
false,
167 ->text(
$lng->txt(
'name'),
'')
173 ->textarea(
$lng->txt(
'iass_record'),
$lng->txt(
'iass_record_info'))
175 ->withDisabled(!$may_be_edited)
179 ->textarea(
$lng->txt(
'iass_internal_note'),
$lng->txt(
'iass_internal_note_info'))
181 ->withDisabled(!$may_be_edited)
185 ->file($file_handler,
$lng->txt(
'iass_upload_file'),
$lng->txt(
'iass_file_dropzone'))
189 $file_visible = $input
190 ->checkbox(
$lng->txt(
'iass_file_visible_examinee'))
192 ->withDisabled(!$may_be_edited)
196 ->select(
$lng->txt(
'grading'), $grading_options)
198 ->withDisabled(!$may_be_edited)
203 ->text(
$lng->txt(
'iass_place'))
205 ->withRequired($place_required)
206 ->withDisabled(!$may_be_edited)
210 ->dateTime(
$lng->txt(
'iass_event_time'))
211 ->withRequired($place_required)
212 ->withDisabled(!$may_be_edited)
216 $format = $data_factory->dateFormat()->standard()->toString();
221 ->checkbox(
$lng->txt(
'iass_notify'),
$lng->txt(
'iass_notify_explanation'))
223 ->withDisabled(!$may_be_edited)
231 'file_visible' => $file_visible,
240 ->checkbox(
$lng->txt(
'iass_finalize'),
$lng->txt(
'iass_finalize_info'))
242 ->withDisabled(!$may_be_edited)
248 return $input->section(
250 $lng->txt(
'iass_edit_record')
251 )->withAdditionalTransformation(
252 $refinery->custom()->transformation(function ($values) use ($amend) {
260 isset($values[
'file'][0]) &&
261 trim($values[
'file'][0]) !=
''
263 $file = $values[
'file'][0];
269 $values[
'internal_note'],
271 $values[
'file_visible'],
272 (
int) $values[
'learning_progress'],
274 $values[
'event_time'],
An exception for terminatinating execution or to throw for unit testing.
return true
Flag indicating whether or not HTTP headers will be sent when outputting captcha image/audio.
withFinalized(bool $finalize)
__construct(string $name, string $record, string $internal_note, ?string $file, bool $is_file_visible, int $learning_progress, string $place, ?DateTimeImmutable $event_time, bool $notify, bool $finalized=false)
toFormInput(Field\Factory $input, DataFactory $data_factory, \ilLanguage $lng, Refinery $refinery, array $grading_options, bool $may_be_edited=true, bool $place_required=false, bool $amend=false, ilIndividualAssessmentMemberGUI $file_handler)