ILIAS  release_9 Revision v9.13-25-g2c18ec4c24f
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, 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.

50  {
51  $this->name = $name;
52  $this->record = $record;
53  $this->internal_note = $internal_note;
54  $this->file = $file;
55  $this->is_file_visible = $is_file_visible;
56  $this->learning_progress = $learning_progress;
57  $this->place = $place;
58  $this->event_time = $event_time;
59  $this->notify = $notify;
60  $this->finalized = $finalized;
61  }

Member Function Documentation

◆ getEventTime()

ilIndividualAssessmentUserGrading::getEventTime ( )

Definition at line 103 of file ilIndividualAssessmentUserGrading.php.

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.

References $file.

Referenced by toFormInput().

78  : ?string
79  {
80  return $this->file;
81  }
+ Here is the caller graph for this function:

◆ getInternalNote()

ilIndividualAssessmentUserGrading::getInternalNote ( )

Definition at line 73 of file ilIndividualAssessmentUserGrading.php.

References $internal_note.

Referenced by toFormInput().

73  : string
74  {
75  return $this->internal_note;
76  }
+ Here is the caller graph for this function:

◆ getLearningProgress()

ilIndividualAssessmentUserGrading::getLearningProgress ( )

Definition at line 93 of file ilIndividualAssessmentUserGrading.php.

References $learning_progress.

Referenced by toFormInput().

+ Here is the caller graph for this function:

◆ getName()

ilIndividualAssessmentUserGrading::getName ( )

Definition at line 63 of file ilIndividualAssessmentUserGrading.php.

References $name.

Referenced by toFormInput().

63  : string
64  {
65  return $this->name;
66  }
+ Here is the caller graph for this function:

◆ getPlace()

ilIndividualAssessmentUserGrading::getPlace ( )

Definition at line 98 of file ilIndividualAssessmentUserGrading.php.

References $place.

Referenced by toFormInput().

98  : string
99  {
100  return $this->place;
101  }
+ Here is the caller graph for this function:

◆ getRecord()

ilIndividualAssessmentUserGrading::getRecord ( )

Definition at line 68 of file ilIndividualAssessmentUserGrading.php.

References $record.

Referenced by toFormInput().

68  : string
69  {
70  return $this->record;
71  }
+ Here is the caller graph for this function:

◆ hasFile()

ilIndividualAssessmentUserGrading::hasFile ( )

Definition at line 83 of file ilIndividualAssessmentUserGrading.php.

Referenced by toFormInput().

83  : bool
84  {
85  return !empty($this->file);
86  }
+ Here is the caller graph for this function:

◆ isFileVisible()

ilIndividualAssessmentUserGrading::isFileVisible ( )

Definition at line 88 of file ilIndividualAssessmentUserGrading.php.

References $is_file_visible.

Referenced by toFormInput().

+ Here is the caller graph for this function:

◆ isFinalized()

ilIndividualAssessmentUserGrading::isFinalized ( )

Definition at line 113 of file ilIndividualAssessmentUserGrading.php.

References $finalized.

Referenced by toFormInput().

113  : bool
114  {
115  return $this->finalized;
116  }
+ Here is the caller graph for this function:

◆ isNotify()

ilIndividualAssessmentUserGrading::isNotify ( )

Definition at line 108 of file ilIndividualAssessmentUserGrading.php.

References $notify.

Referenced by toFormInput().

108  : bool
109  {
110  return $this->notify;
111  }
+ Here is the caller graph for this function:

◆ toFormInput()

ilIndividualAssessmentUserGrading::toFormInput ( Field\Factory  $input,
DataFactory  $data_factory,
ilLanguage  $lng,
Refinery  $refinery,
AbstractCtrlAwareUploadHandler  $file_handler,
\ILIAS\Data\DateFormat\DateFormat  $date_format,
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.

References $event_time, $file, $finalized, $internal_note, $learning_progress, $name, $notify, $place, $record, getEventTime(), getFile(), getInternalNote(), getLearningProgress(), getName(), getPlace(), getRecord(), hasFile(), isFileVisible(), isFinalized(), isNotify(), ilIndividualAssessmentMembers\LP_IN_PROGRESS, ilLanguage\txt(), ILIAS\UI\Implementation\Component\Input\ViewControl\withAdditionalTransformation(), ILIAS\UI\Implementation\Component\Input\withValue(), and ILIAS\UI\Component\Input\Input\withValue().

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

◆ withFile()

ilIndividualAssessmentUserGrading::withFile ( ?string  $file)

Definition at line 125 of file ilIndividualAssessmentUserGrading.php.

References $file.

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

◆ 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(), toFormInput(), and withFile().

◆ $finalized

bool ilIndividualAssessmentUserGrading::$finalized
protected

Definition at line 37 of file ilIndividualAssessmentUserGrading.php.

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

◆ $internal_note

string ilIndividualAssessmentUserGrading::$internal_note
protected

Definition at line 30 of file ilIndividualAssessmentUserGrading.php.

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

◆ $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

◆ $name

string ilIndividualAssessmentUserGrading::$name
protected

Definition at line 28 of file ilIndividualAssessmentUserGrading.php.

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

◆ $notify

bool ilIndividualAssessmentUserGrading::$notify
protected

Definition at line 36 of file ilIndividualAssessmentUserGrading.php.

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

◆ $place

string ilIndividualAssessmentUserGrading::$place
protected

Definition at line 34 of file ilIndividualAssessmentUserGrading.php.

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

◆ $record

string ilIndividualAssessmentUserGrading::$record
protected

Definition at line 29 of file ilIndividualAssessmentUserGrading.php.

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


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