ILIAS  release_7 Revision v7.30-3-g800a261c036
All Data Structures Namespaces Files Functions Variables Modules Pages
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.

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.

References $file.

Referenced by toFormInput().

101  : ?string
102  {
103  return $this->file;
104  }
+ Here is the caller graph for this function:

◆ getInternalNote()

ilIndividualAssessmentUserGrading::getInternalNote ( )

Definition at line 96 of file ilIndividualAssessmentUserGrading.php.

References $internal_note.

Referenced by toFormInput().

+ Here is the caller graph for this function:

◆ getLearningProgress()

ilIndividualAssessmentUserGrading::getLearningProgress ( )

Definition at line 116 of file ilIndividualAssessmentUserGrading.php.

References $learning_progress.

Referenced by toFormInput().

+ Here is the caller graph for this function:

◆ getName()

ilIndividualAssessmentUserGrading::getName ( )

Definition at line 86 of file ilIndividualAssessmentUserGrading.php.

References $name.

Referenced by toFormInput().

86  : string
87  {
88  return $this->name;
89  }
+ Here is the caller graph for this function:

◆ getPlace()

ilIndividualAssessmentUserGrading::getPlace ( )

Definition at line 121 of file ilIndividualAssessmentUserGrading.php.

References $place.

Referenced by toFormInput().

121  : string
122  {
123  return $this->place;
124  }
+ Here is the caller graph for this function:

◆ getRecord()

ilIndividualAssessmentUserGrading::getRecord ( )

Definition at line 91 of file ilIndividualAssessmentUserGrading.php.

References $record.

Referenced by toFormInput().

+ Here is the caller graph for this function:

◆ hasFile()

ilIndividualAssessmentUserGrading::hasFile ( )

Definition at line 106 of file ilIndividualAssessmentUserGrading.php.

Referenced by toFormInput().

106  : bool
107  {
108  return !empty($this->file);
109  }
+ Here is the caller graph for this function:

◆ isFileVisible()

ilIndividualAssessmentUserGrading::isFileVisible ( )

Definition at line 111 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 136 of file ilIndividualAssessmentUserGrading.php.

References $finalized.

Referenced by toFormInput().

136  : bool
137  {
138  return $this->finalized;
139  }
+ Here is the caller graph for this function:

◆ isNotify()

ilIndividualAssessmentUserGrading::isNotify ( )

Definition at line 131 of file ilIndividualAssessmentUserGrading.php.

References $notify.

Referenced by toFormInput().

131  : bool
132  {
133  return $this->notify;
134  }
+ Here is the caller graph for this function:

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

References $event_time, $file, $finalized, $format, $internal_note, $learning_progress, $name, $notify, $place, $record, getEventTime(), getFile(), getInternalNote(), getLearningProgress(), getName(), getPlace(), getRecord(), hasFile(), isFileVisible(), isFinalized(), isNotify(), ilIndividualAssessmentMembers\LP_IN_PROGRESS, and ilLanguage\txt().

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)
197  ->withValue($this->getLearningProgress() ? $this->getLearningProgress() : ilIndividualAssessmentMembers::LP_IN_PROGRESS)
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'],
276  $finalized
277  );
278  })
279  );
280  }
$lng
$format
Definition: metadata.php:218
Member administration related logic, add and remove members, get the list of all members, etc.
+ Here is the call graph for this function:

◆ withFile()

ilIndividualAssessmentUserGrading::withFile ( ?string  $file)

Definition at line 148 of file ilIndividualAssessmentUserGrading.php.

References $file.

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

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

◆ $finalized

ilIndividualAssessmentUserGrading::$finalized
protected

Definition at line 60 of file ilIndividualAssessmentUserGrading.php.

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

◆ $internal_note

ilIndividualAssessmentUserGrading::$internal_note
protected

Definition at line 25 of file ilIndividualAssessmentUserGrading.php.

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

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

◆ $name

ilIndividualAssessmentUserGrading::$name
protected

Definition at line 15 of file ilIndividualAssessmentUserGrading.php.

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

◆ $notify

ilIndividualAssessmentUserGrading::$notify
protected

Definition at line 55 of file ilIndividualAssessmentUserGrading.php.

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

◆ $place

ilIndividualAssessmentUserGrading::$place
protected

Definition at line 45 of file ilIndividualAssessmentUserGrading.php.

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

◆ $record

ilIndividualAssessmentUserGrading::$record
protected

Definition at line 20 of file ilIndividualAssessmentUserGrading.php.

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


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