ILIAS  trunk Revision v11.0_alpha-3011-gc6b235a2e85
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, AbstractCtrlAwareUploadHandler $file_handler, \ILIAS\Data\DateFormat\DateFormat $date_format, string $record_template, array $grading_options, bool $may_be_edited=true, bool $place_required=false, bool $file_required=false, bool $amend=false)
 

Protected Attributes

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
 

Detailed Description

Definition at line 26 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 39 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 103 of file ilIndividualAssessmentUserGrading.php.

103 : ?DateTimeImmutable
104 {
105 return $this->event_time;
106 }

References $event_time.

Referenced by toFormInput().

+ Here is the caller graph for this function:

◆ getFile()

ilIndividualAssessmentUserGrading::getFile ( )

Definition at line 78 of file ilIndividualAssessmentUserGrading.php.

78 : ?string
79 {
80 return $this->file;
81 }

References $file.

◆ getInternalNote()

ilIndividualAssessmentUserGrading::getInternalNote ( )

Definition at line 73 of file ilIndividualAssessmentUserGrading.php.

73 : string
74 {
76 }

References $internal_note.

◆ getLearningProgress()

ilIndividualAssessmentUserGrading::getLearningProgress ( )

Definition at line 93 of file ilIndividualAssessmentUserGrading.php.

93 : int
94 {
96 }

References $learning_progress.

◆ getName()

ilIndividualAssessmentUserGrading::getName ( )

Definition at line 63 of file ilIndividualAssessmentUserGrading.php.

63 : string
64 {
65 return $this->name;
66 }

References $name.

◆ getPlace()

ilIndividualAssessmentUserGrading::getPlace ( )

Definition at line 98 of file ilIndividualAssessmentUserGrading.php.

98 : string
99 {
100 return $this->place;
101 }

References $place.

◆ getRecord()

ilIndividualAssessmentUserGrading::getRecord ( )

Definition at line 68 of file ilIndividualAssessmentUserGrading.php.

68 : string
69 {
70 return $this->record;
71 }

References $record.

◆ hasFile()

ilIndividualAssessmentUserGrading::hasFile ( )

Definition at line 83 of file ilIndividualAssessmentUserGrading.php.

83 : bool
84 {
85 return !empty($this->file);
86 }

◆ isFileVisible()

ilIndividualAssessmentUserGrading::isFileVisible ( )

Definition at line 88 of file ilIndividualAssessmentUserGrading.php.

88 : bool
89 {
91 }

References $is_file_visible.

◆ isFinalized()

ilIndividualAssessmentUserGrading::isFinalized ( )

Definition at line 113 of file ilIndividualAssessmentUserGrading.php.

113 : bool
114 {
115 return $this->finalized;
116 }

References $finalized.

◆ isNotify()

ilIndividualAssessmentUserGrading::isNotify ( )

Definition at line 108 of file ilIndividualAssessmentUserGrading.php.

108 : bool
109 {
110 return $this->notify;
111 }

References $notify.

◆ toFormInput()

ilIndividualAssessmentUserGrading::toFormInput ( Field\Factory  $input,
DataFactory  $data_factory,
ilLanguage  $lng,
Refinery  $refinery,
AbstractCtrlAwareUploadHandler  $file_handler,
\ILIAS\Data\DateFormat\DateFormat  $date_format,
string  $record_template,
array  $grading_options,
bool  $may_be_edited = true,
bool  $place_required = false,
bool  $file_required = false,
bool  $amend = false 
)

Definition at line 132 of file ilIndividualAssessmentUserGrading.php.

146 $name = $input
147 ->text($lng->txt('name'), '')
148 ->withDisabled(true)
149 ->withValue($this->getName())
150 ;
151
152 $record = $input
153 ->textarea($lng->txt('iass_record'), $lng->txt('iass_record_info'))
154 ->withValue($this->getRecord() ? "" : $record_template)
155 ->withDisabled(!$may_be_edited)
156 ;
157
158 $internal_note = $input
159 ->textarea($lng->txt('iass_internal_note'), $lng->txt('iass_internal_note_info'))
160 ->withValue($this->getInternalNote())
161 ->withDisabled(!$may_be_edited)
162 ;
163
164 $file = $input
165 ->file($file_handler, $lng->txt('iass_upload_file'), $lng->txt('iass_file_dropzone'))
166 ->withValue($this->hasFile() ? [$this->getFile()] : [])
167 ->withRequired($file_required)
168 ;
169
170 $file_visible = $input
171 ->checkbox($lng->txt('iass_file_visible_examinee'))
172 ->withValue($this->isFileVisible())
173 ->withDisabled(!$may_be_edited)
174 ;
175
176 $learning_progress = $input
177 ->select($lng->txt('grading'), $grading_options)
179 ->withDisabled(!$may_be_edited)
180 ->withRequired(true)
181 ;
182
183 $place = $input
184 ->text($lng->txt('iass_place'))
185 ->withValue($this->getPlace())
186 ->withRequired($place_required)
187 ->withDisabled(!$may_be_edited)
188 ;
189
190 $event_time = $input
191 ->dateTime($lng->txt('iass_event_time'))
192 ->withUseTime(true)
193 ->withFormat($date_format)
194 ->withRequired($place_required)
195 ->withDisabled(!$may_be_edited)
196 ;
197
198 if (!is_null($this->getEventTime())) {
199 $event_time = $event_time->withValue(
200 $this->getEventTime()
201 );
202 }
203
204 $notify = $input
205 ->checkbox($lng->txt('iass_notify'), $lng->txt('iass_notify_explanation'))
206 ->withValue($this->isNotify())
207 ->withDisabled(!$may_be_edited)
208 ;
209
210 $fields = [
211 'name' => $name,
212 'record' => $record,
213 'internal_note' => $internal_note,
214 'file' => $file,
215 'file_visible' => $file_visible,
216 'learning_progress' => $learning_progress,
217 'place' => $place,
218 'event_time' => $event_time,
219 'notify' => $notify
220 ];
221
222 if (!$amend) {
223 $finalized = $input
224 ->checkbox($lng->txt('iass_finalize'), $lng->txt('iass_finalize_info'))
225 ->withValue($this->isFinalized())
226 ->withDisabled(!$may_be_edited)
227 ;
228
229 $fields['finalized'] = $finalized;
230 }
231
232 return $input->section(
233 $fields,
234 $lng->txt('iass_edit_record')
235 )->withAdditionalTransformation(
236 $refinery->custom()->transformation(function ($values) use ($amend) {
237 $finalized = $this->isFinalized();
238 if (!$amend) {
239 $finalized = $values['finalized'];
240 }
241
242 $file = null;
243 if (
244 isset($values['file'][0]) &&
245 trim($values['file'][0]) != ''
246 ) {
247 $file = $values['file'][0];
248 }
249
251 $values['name'],
252 $values['record'],
253 $values['internal_note'],
254 $file,
255 $values['file_visible'],
256 (int) $values['learning_progress'],
257 $values['place'],
258 $values['event_time'],
259 $values['notify'],
261 );
262 })
263 );
264 }
This describes inputs that can be used in forms.
Definition: FormInput.php:33
global $lng
Definition: privfeed.php:31

References $event_time, and getEventTime().

+ Here is the call graph for this function:

◆ withFile()

ilIndividualAssessmentUserGrading::withFile ( ?string  $file)

Definition at line 125 of file ilIndividualAssessmentUserGrading.php.

126 {
127 $clone = clone $this;
128 $clone->file = $file;
129 return $clone;
130 }

References $file.

◆ withFinalized()

ilIndividualAssessmentUserGrading::withFinalized ( bool  $finalize)

Definition at line 118 of file ilIndividualAssessmentUserGrading.php.

119 {
120 $clone = clone $this;
121 $clone->finalized = $finalize;
122 return $clone;
123 }

Field Documentation

◆ $event_time

DateTimeImmutable ilIndividualAssessmentUserGrading::$event_time
protected

Definition at line 35 of file ilIndividualAssessmentUserGrading.php.

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

◆ $file

string ilIndividualAssessmentUserGrading::$file
protected

Definition at line 31 of file ilIndividualAssessmentUserGrading.php.

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

◆ $finalized

bool ilIndividualAssessmentUserGrading::$finalized
protected

Definition at line 37 of file ilIndividualAssessmentUserGrading.php.

Referenced by __construct(), and isFinalized().

◆ $internal_note

string ilIndividualAssessmentUserGrading::$internal_note
protected

Definition at line 30 of file ilIndividualAssessmentUserGrading.php.

Referenced by __construct(), and getInternalNote().

◆ $is_file_visible

bool ilIndividualAssessmentUserGrading::$is_file_visible
protected

Definition at line 32 of file ilIndividualAssessmentUserGrading.php.

Referenced by __construct(), and isFileVisible().

◆ $learning_progress

int ilIndividualAssessmentUserGrading::$learning_progress
protected

Definition at line 33 of file ilIndividualAssessmentUserGrading.php.

Referenced by __construct(), and getLearningProgress().

◆ $name

string ilIndividualAssessmentUserGrading::$name
protected

Definition at line 28 of file ilIndividualAssessmentUserGrading.php.

Referenced by __construct(), and getName().

◆ $notify

bool ilIndividualAssessmentUserGrading::$notify
protected

Definition at line 36 of file ilIndividualAssessmentUserGrading.php.

Referenced by __construct(), and isNotify().

◆ $place

string ilIndividualAssessmentUserGrading::$place
protected

Definition at line 34 of file ilIndividualAssessmentUserGrading.php.

Referenced by __construct(), and getPlace().

◆ $record

string ilIndividualAssessmentUserGrading::$record
protected

Definition at line 29 of file ilIndividualAssessmentUserGrading.php.

Referenced by __construct(), and getRecord().


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