ILIAS  release_6 Revision v6.24-5-g0c8bfefb3b8
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, \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 9 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 61 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 125 of file ilIndividualAssessmentUserGrading.php.

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

References $event_time.

Referenced by toFormInput().

+ Here is the caller graph for this function:

◆ getFile()

ilIndividualAssessmentUserGrading::getFile ( )

Definition at line 100 of file ilIndividualAssessmentUserGrading.php.

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

References $file.

◆ getInternalNote()

ilIndividualAssessmentUserGrading::getInternalNote ( )

Definition at line 95 of file ilIndividualAssessmentUserGrading.php.

95 : string
96 {
98 }

References $internal_note.

◆ getLearningProgress()

ilIndividualAssessmentUserGrading::getLearningProgress ( )

Definition at line 115 of file ilIndividualAssessmentUserGrading.php.

115 : int
116 {
118 }

References $learning_progress.

◆ getName()

ilIndividualAssessmentUserGrading::getName ( )

Definition at line 85 of file ilIndividualAssessmentUserGrading.php.

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

References $name.

◆ getPlace()

ilIndividualAssessmentUserGrading::getPlace ( )

Definition at line 120 of file ilIndividualAssessmentUserGrading.php.

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

References $place.

◆ getRecord()

ilIndividualAssessmentUserGrading::getRecord ( )

Definition at line 90 of file ilIndividualAssessmentUserGrading.php.

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

References $record.

◆ hasFile()

ilIndividualAssessmentUserGrading::hasFile ( )

Definition at line 105 of file ilIndividualAssessmentUserGrading.php.

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

◆ isFileVisible()

ilIndividualAssessmentUserGrading::isFileVisible ( )

Definition at line 110 of file ilIndividualAssessmentUserGrading.php.

110 : bool
111 {
113 }

References $is_file_visible.

◆ isFinalized()

ilIndividualAssessmentUserGrading::isFinalized ( )

Definition at line 135 of file ilIndividualAssessmentUserGrading.php.

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

References $finalized.

◆ isNotify()

ilIndividualAssessmentUserGrading::isNotify ( )

Definition at line 130 of file ilIndividualAssessmentUserGrading.php.

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

References $notify.

◆ toFormInput()

ilIndividualAssessmentUserGrading::toFormInput ( Field\Factory  $input,
\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 154 of file ilIndividualAssessmentUserGrading.php.

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

References $event_time, and getEventTime().

+ Here is the call graph for this function:

◆ withFile()

ilIndividualAssessmentUserGrading::withFile ( ?string  $file)

Definition at line 147 of file ilIndividualAssessmentUserGrading.php.

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

References $file.

Referenced by ilIndividualAssessmentMemberGUI\getRemoveResult().

+ Here is the caller graph for this function:

◆ withFinalized()

ilIndividualAssessmentUserGrading::withFinalized ( bool  $finalize)

Definition at line 140 of file ilIndividualAssessmentUserGrading.php.

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

Field Documentation

◆ $event_time

ilIndividualAssessmentUserGrading::$event_time
protected

Definition at line 49 of file ilIndividualAssessmentUserGrading.php.

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

◆ $file

ilIndividualAssessmentUserGrading::$file
protected

Definition at line 29 of file ilIndividualAssessmentUserGrading.php.

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

◆ $finalized

ilIndividualAssessmentUserGrading::$finalized
protected

Definition at line 59 of file ilIndividualAssessmentUserGrading.php.

Referenced by __construct(), and isFinalized().

◆ $internal_note

ilIndividualAssessmentUserGrading::$internal_note
protected

Definition at line 24 of file ilIndividualAssessmentUserGrading.php.

Referenced by __construct(), and getInternalNote().

◆ $is_file_visible

ilIndividualAssessmentUserGrading::$is_file_visible
protected

Definition at line 34 of file ilIndividualAssessmentUserGrading.php.

Referenced by __construct(), and isFileVisible().

◆ $learning_progress

ilIndividualAssessmentUserGrading::$learning_progress
protected

Definition at line 39 of file ilIndividualAssessmentUserGrading.php.

Referenced by __construct(), and getLearningProgress().

◆ $name

ilIndividualAssessmentUserGrading::$name
protected

Definition at line 14 of file ilIndividualAssessmentUserGrading.php.

Referenced by __construct(), and getName().

◆ $notify

ilIndividualAssessmentUserGrading::$notify
protected

Definition at line 54 of file ilIndividualAssessmentUserGrading.php.

Referenced by __construct(), and isNotify().

◆ $place

ilIndividualAssessmentUserGrading::$place
protected

Definition at line 44 of file ilIndividualAssessmentUserGrading.php.

Referenced by __construct(), and getPlace().

◆ $record

ilIndividualAssessmentUserGrading::$record
protected

Definition at line 19 of file ilIndividualAssessmentUserGrading.php.

Referenced by __construct(), and getRecord().


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