ILIAS  release_6 Revision v6.24-5-g0c8bfefb3b8
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, \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.

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.

References $file.

Referenced by toFormInput().

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

◆ getInternalNote()

ilIndividualAssessmentUserGrading::getInternalNote ( )

Definition at line 95 of file ilIndividualAssessmentUserGrading.php.

References $internal_note.

Referenced by toFormInput().

+ Here is the caller graph for this function:

◆ getLearningProgress()

ilIndividualAssessmentUserGrading::getLearningProgress ( )

Definition at line 115 of file ilIndividualAssessmentUserGrading.php.

References $learning_progress.

Referenced by toFormInput().

+ Here is the caller graph for this function:

◆ getName()

ilIndividualAssessmentUserGrading::getName ( )

Definition at line 85 of file ilIndividualAssessmentUserGrading.php.

References $name.

Referenced by toFormInput().

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

◆ getPlace()

ilIndividualAssessmentUserGrading::getPlace ( )

Definition at line 120 of file ilIndividualAssessmentUserGrading.php.

References $place.

Referenced by toFormInput().

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

◆ getRecord()

ilIndividualAssessmentUserGrading::getRecord ( )

Definition at line 90 of file ilIndividualAssessmentUserGrading.php.

References $record.

Referenced by toFormInput().

+ Here is the caller graph for this function:

◆ hasFile()

ilIndividualAssessmentUserGrading::hasFile ( )

Definition at line 105 of file ilIndividualAssessmentUserGrading.php.

Referenced by toFormInput().

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

◆ isFileVisible()

ilIndividualAssessmentUserGrading::isFileVisible ( )

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

References $finalized.

Referenced by toFormInput().

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

◆ isNotify()

ilIndividualAssessmentUserGrading::isNotify ( )

Definition at line 130 of file ilIndividualAssessmentUserGrading.php.

References $notify.

Referenced by toFormInput().

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

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

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, and ilLanguage\txt().

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)
195  ->withValue($this->getLearningProgress() ? $this->getLearningProgress() : ilIndividualAssessmentMembers::LP_IN_PROGRESS)
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'],
273  $finalized
274  );
275  })
276  );
277  }
$lng
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 147 of file ilIndividualAssessmentUserGrading.php.

References $file.

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

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

◆ $finalized

ilIndividualAssessmentUserGrading::$finalized
protected

Definition at line 59 of file ilIndividualAssessmentUserGrading.php.

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

◆ $internal_note

ilIndividualAssessmentUserGrading::$internal_note
protected

Definition at line 24 of file ilIndividualAssessmentUserGrading.php.

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

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

◆ $name

ilIndividualAssessmentUserGrading::$name
protected

Definition at line 14 of file ilIndividualAssessmentUserGrading.php.

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

◆ $notify

ilIndividualAssessmentUserGrading::$notify
protected

Definition at line 54 of file ilIndividualAssessmentUserGrading.php.

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

◆ $place

ilIndividualAssessmentUserGrading::$place
protected

Definition at line 44 of file ilIndividualAssessmentUserGrading.php.

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

◆ $record

ilIndividualAssessmentUserGrading::$record
protected

Definition at line 19 of file ilIndividualAssessmentUserGrading.php.

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


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