ILIAS  release_7 Revision v7.30-3-g800a261c036
ilIndividualAssessmentUserGrading Class Reference
+ Collaboration diagram for ilIndividualAssessmentUserGrading:

Public Member Functions

 __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)
 
 getName ()
 
 getRecord ()
 
 getInternalNote ()
 
 getFile ()
 
 hasFile ()
 
 isFileVisible ()
 
 getLearningProgress ()
 
 getPlace ()
 
 getEventTime ()
 
 isNotify ()
 
 isFinalized ()
 
 withFinalized (bool $finalize)
 
 withFile (?string $file)
 
 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)
 

Protected Attributes

 $name
 
 $record
 
 $internal_note
 
 $file
 
 $is_file_visible
 
 $learning_progress
 
 $place
 
 $event_time
 
 $notify
 
 $finalized
 

Detailed Description

Definition at line 10 of file ilIndividualAssessmentUserGrading.php.

Constructor & Destructor Documentation

◆ __construct()

ilIndividualAssessmentUserGrading::__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 
)

Definition at line 62 of file ilIndividualAssessmentUserGrading.php.

References $event_time, $file, $finalized, $internal_note, $is_file_visible, $learning_progress, $name, $notify, $place, and $record.

Member Function Documentation

◆ getEventTime()

ilIndividualAssessmentUserGrading::getEventTime ( )

Definition at line 126 of file ilIndividualAssessmentUserGrading.php.

126 : ?DateTimeImmutable
127 {
128 return $this->event_time;
129 }

References $event_time.

Referenced by toFormInput().

+ Here is the caller graph for this function:

◆ getFile()

ilIndividualAssessmentUserGrading::getFile ( )

Definition at line 101 of file ilIndividualAssessmentUserGrading.php.

101 : ?string
102 {
103 return $this->file;
104 }

References $file.

◆ getInternalNote()

ilIndividualAssessmentUserGrading::getInternalNote ( )

Definition at line 96 of file ilIndividualAssessmentUserGrading.php.

96 : string
97 {
99 }

References $internal_note.

◆ getLearningProgress()

ilIndividualAssessmentUserGrading::getLearningProgress ( )

Definition at line 116 of file ilIndividualAssessmentUserGrading.php.

116 : int
117 {
119 }

References $learning_progress.

◆ getName()

ilIndividualAssessmentUserGrading::getName ( )

Definition at line 86 of file ilIndividualAssessmentUserGrading.php.

86 : string
87 {
88 return $this->name;
89 }

References $name.

◆ getPlace()

ilIndividualAssessmentUserGrading::getPlace ( )

Definition at line 121 of file ilIndividualAssessmentUserGrading.php.

121 : string
122 {
123 return $this->place;
124 }

References $place.

◆ getRecord()

ilIndividualAssessmentUserGrading::getRecord ( )

Definition at line 91 of file ilIndividualAssessmentUserGrading.php.

91 : string
92 {
93 return $this->record;
94 }

References $record.

◆ hasFile()

ilIndividualAssessmentUserGrading::hasFile ( )

Definition at line 106 of file ilIndividualAssessmentUserGrading.php.

106 : bool
107 {
108 return !empty($this->file);
109 }

◆ isFileVisible()

ilIndividualAssessmentUserGrading::isFileVisible ( )

Definition at line 111 of file ilIndividualAssessmentUserGrading.php.

111 : bool
112 {
114 }

References $is_file_visible.

◆ isFinalized()

ilIndividualAssessmentUserGrading::isFinalized ( )

Definition at line 136 of file ilIndividualAssessmentUserGrading.php.

136 : bool
137 {
138 return $this->finalized;
139 }

References $finalized.

◆ isNotify()

ilIndividualAssessmentUserGrading::isNotify ( )

Definition at line 131 of file ilIndividualAssessmentUserGrading.php.

131 : bool
132 {
133 return $this->notify;
134 }

References $notify.

◆ toFormInput()

ilIndividualAssessmentUserGrading::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 
)

Definition at line 155 of file ilIndividualAssessmentUserGrading.php.

165 : Field\Input {
166 $name = $input
167 ->text($lng->txt('name'), '')
168 ->withDisabled(true)
169 ->withValue($this->getName())
170 ;
171
172 $record = $input
173 ->textarea($lng->txt('iass_record'), $lng->txt('iass_record_info'))
174 ->withValue($this->getRecord())
175 ->withDisabled(!$may_be_edited)
176 ;
177
178 $internal_note = $input
179 ->textarea($lng->txt('iass_internal_note'), $lng->txt('iass_internal_note_info'))
180 ->withValue($this->getInternalNote())
181 ->withDisabled(!$may_be_edited)
182 ;
183
184 $file = $input
185 ->file($file_handler, $lng->txt('iass_upload_file'), $lng->txt('iass_file_dropzone'))
186 ->withValue($this->hasFile() ? [$this->getFile()] : null)
187 ;
188
189 $file_visible = $input
190 ->checkbox($lng->txt('iass_file_visible_examinee'))
191 ->withValue($this->isFileVisible())
192 ->withDisabled(!$may_be_edited)
193 ;
194
195 $learning_progress = $input
196 ->select($lng->txt('grading'), $grading_options)
198 ->withDisabled(!$may_be_edited)
199 ->withRequired(true)
200 ;
201
202 $place = $input
203 ->text($lng->txt('iass_place'))
204 ->withValue($this->getPlace())
205 ->withRequired($place_required)
206 ->withDisabled(!$may_be_edited)
207 ;
208
209 $event_time = $input
210 ->dateTime($lng->txt('iass_event_time'))
211 ->withRequired($place_required)
212 ->withDisabled(!$may_be_edited)
213 ;
214
215 if (!is_null($this->getEventTime())) {
216 $format = $data_factory->dateFormat()->standard()->toString();
217 $event_time = $event_time->withValue($this->getEventTime()->format($format));
218 }
219
220 $notify = $input
221 ->checkbox($lng->txt('iass_notify'), $lng->txt('iass_notify_explanation'))
222 ->withValue($this->isNotify())
223 ->withDisabled(!$may_be_edited)
224 ;
225
226 $fields = [
227 'name' => $name,
228 'record' => $record,
229 'internal_note' => $internal_note,
230 'file' => $file,
231 'file_visible' => $file_visible,
232 'learning_progress' => $learning_progress,
233 'place' => $place,
234 'event_time' => $event_time,
235 'notify' => $notify
236 ];
237
238 if (!$amend) {
239 $finalized = $input
240 ->checkbox($lng->txt('iass_finalize'), $lng->txt('iass_finalize_info'))
241 ->withValue($this->isFinalized())
242 ->withDisabled(!$may_be_edited)
243 ;
244
245 $fields['finalized'] = $finalized;
246 }
247
248 return $input->section(
249 $fields,
250 $lng->txt('iass_edit_record')
251 )->withAdditionalTransformation(
252 $refinery->custom()->transformation(function ($values) use ($amend) {
253 $finalized = $this->isFinalized();
254 if (!$amend) {
255 $finalized = $values['finalized'];
256 }
257
258 $file = $this->getFile();
259 if (
260 isset($values['file'][0]) &&
261 trim($values['file'][0]) != ''
262 ) {
263 $file = $values['file'][0];
264 }
265
267 $values['name'],
268 $values['record'],
269 $values['internal_note'],
270 $file,
271 $values['file_visible'],
272 (int) $values['learning_progress'],
273 $values['place'],
274 $values['event_time'],
275 $values['notify'],
277 );
278 })
279 );
280 }
$format
Definition: metadata.php:218
$lng

References $event_time, $format, and getEventTime().

+ Here is the call graph for this function:

◆ withFile()

ilIndividualAssessmentUserGrading::withFile ( ?string  $file)

Definition at line 148 of file ilIndividualAssessmentUserGrading.php.

149 {
150 $clone = clone $this;
151 $clone->file = $file;
152 return $clone;
153 }

References $file.

Referenced by ilIndividualAssessmentMemberGUI\getRemoveResult().

+ Here is the caller graph for this function:

◆ withFinalized()

ilIndividualAssessmentUserGrading::withFinalized ( bool  $finalize)

Definition at line 141 of file ilIndividualAssessmentUserGrading.php.

142 {
143 $clone = clone $this;
144 $clone->finalized = $finalize;
145 return $clone;
146 }

Field Documentation

◆ $event_time

ilIndividualAssessmentUserGrading::$event_time
protected

Definition at line 50 of file ilIndividualAssessmentUserGrading.php.

Referenced by __construct(), getEventTime(), and toFormInput().

◆ $file

ilIndividualAssessmentUserGrading::$file
protected

Definition at line 30 of file ilIndividualAssessmentUserGrading.php.

Referenced by __construct(), getFile(), and withFile().

◆ $finalized

ilIndividualAssessmentUserGrading::$finalized
protected

Definition at line 60 of file ilIndividualAssessmentUserGrading.php.

Referenced by __construct(), and isFinalized().

◆ $internal_note

ilIndividualAssessmentUserGrading::$internal_note
protected

Definition at line 25 of file ilIndividualAssessmentUserGrading.php.

Referenced by __construct(), and getInternalNote().

◆ $is_file_visible

ilIndividualAssessmentUserGrading::$is_file_visible
protected

Definition at line 35 of file ilIndividualAssessmentUserGrading.php.

Referenced by __construct(), and isFileVisible().

◆ $learning_progress

ilIndividualAssessmentUserGrading::$learning_progress
protected

Definition at line 40 of file ilIndividualAssessmentUserGrading.php.

Referenced by __construct(), and getLearningProgress().

◆ $name

ilIndividualAssessmentUserGrading::$name
protected

Definition at line 15 of file ilIndividualAssessmentUserGrading.php.

Referenced by __construct(), and getName().

◆ $notify

ilIndividualAssessmentUserGrading::$notify
protected

Definition at line 55 of file ilIndividualAssessmentUserGrading.php.

Referenced by __construct(), and isNotify().

◆ $place

ilIndividualAssessmentUserGrading::$place
protected

Definition at line 45 of file ilIndividualAssessmentUserGrading.php.

Referenced by __construct(), and getPlace().

◆ $record

ilIndividualAssessmentUserGrading::$record
protected

Definition at line 20 of file ilIndividualAssessmentUserGrading.php.

Referenced by __construct(), and getRecord().


The documentation for this class was generated from the following file: