ILIAS  release_5-4 Revision v5.4.26-12-gabc799a52e6
ilIndividualAssessmentMember Class Reference

Edit the record of a user, set LP. More...

+ Collaboration diagram for ilIndividualAssessmentMember:

Public Member Functions

 __construct (ilObjIndividualAssessment $iass, ilObjUser $usr, array $data)
 
 record ()
 
 internalNote ()
 
 examinerId ()
 Get the user id of the examiner. More...
 
 changerId ()
 Get the user id of the changer. More...
 
 changeTime ()
 Get the datetime of change. More...
 
 notify ()
 Will the user be notified after finalization? More...
 
 maybeSendNotification (ilIndividualAssessmentNotificator $notificator)
 Notify a user, if he is supposed to be notified, using some notificator object. More...
 
 id ()
 Get the user id corresponding to this membership. More...
 
 assessmentId ()
 Get the ilObjIndividualAssessment id corresponding to this membership. More...
 
 assessment ()
 Get the ilObjIndividualAssessment corresponding to this membership. More...
 
 finalized ()
 Is this membership allready finalized? More...
 
 mayBeFinalized ()
 Can this membership be finalized? More...
 
 withRecord ($record)
 Clone this object and set a record. More...
 
 withInternalNote ($internal_note)
 Clone this object and set an internal note. More...
 
 withPlace ($place)
 Clone this object and set an internal note. More...
 
 withEventTime ($event_time)
 Clone this object and set an internal note. More...
 
 withExaminerId ($examiner_id)
 Clone this object and set an examiner_id. More...
 
 withChangerId ($changer_id)
 Clone this object and set an changer_id. More...
 
 withChangeTime ($change_time)
 Clone this object and set an change time. More...
 
 withNotify ($notify)
 Clone this object and set wether the examinee should be notified. More...
 
 withLPStatus ($lp_status)
 Clone this object and set LP-status. More...
 
 lastname ()
 Get the examinee lastname corresponding to this membership. More...
 
 firstname ()
 Get the examinee firstname corresponding to this membership. More...
 
 login ()
 Get the examinee login corresponding to this membership. More...
 
 name ()
 Get the examinee name corresponding to this membership. More...
 
 LPStatus ()
 Get the LP-status corresponding to this membership. More...
 
 withFinalized ()
 Clone this object and finalize. More...
 
 notificationTS ()
 Get the timestamp, at which the notification was sent. More...
 
 place ()
 Get place where ia was held. More...
 
 eventTime ()
 Get date when ia was. More...
 
 fileName ()
 Get the name of the uploaded file. More...
 
 withFileName ($file_name)
 Set the name of the file. More...
 
 viewFile ()
 Can user see the uploaded file. More...
 
 withViewFile ($view_file)
 Set user can view uploaded file. More...
 

Protected Member Functions

 LPStatusValid ($lp_status)
 

Protected Attributes

 $iass
 
 $usr
 
 $record
 
 $internal_note
 
 $examiner_id
 
 $notify
 
 $finalized
 
 $notification_ts
 
 $lp_status
 
 $place
 
 $event_time
 
 $changer_id
 
 $change_time
 

Detailed Description

Constructor & Destructor Documentation

◆ __construct()

ilIndividualAssessmentMember::__construct ( ilObjIndividualAssessment  $iass,
ilObjUser  $usr,
array  $data 
)

Definition at line 28 of file class.ilIndividualAssessmentMember.php.

29 {
43 $this->iass = $iass;
44 $this->usr = $usr;
45 }
const IL_CAL_UNIX
const IL_CAL_DATETIME
@classDescription Date and time handling
Class for single dates.
finalized()
Is this membership allready finalized?
notify()
Will the user be notified after finalization?
$data
Definition: bench.php:6

References $data, $iass, $usr, ilIndividualAssessmentMembers\FIELD_CHANGE_TIME, ilIndividualAssessmentMembers\FIELD_CHANGER_ID, ilIndividualAssessmentMembers\FIELD_EVENTTIME, ilIndividualAssessmentMembers\FIELD_EXAMINER_ID, ilIndividualAssessmentMembers\FIELD_FILE_NAME, ilIndividualAssessmentMembers\FIELD_FINALIZED, ilIndividualAssessmentMembers\FIELD_INTERNAL_NOTE, ilIndividualAssessmentMembers\FIELD_LEARNING_PROGRESS, ilIndividualAssessmentMembers\FIELD_NOTIFICATION_TS, ilIndividualAssessmentMembers\FIELD_NOTIFY, ilIndividualAssessmentMembers\FIELD_PLACE, ilIndividualAssessmentMembers\FIELD_RECORD, ilIndividualAssessmentMembers\FIELD_USER_VIEW_FILE, finalized(), IL_CAL_DATETIME, IL_CAL_UNIX, notify(), place(), and record().

+ Here is the call graph for this function:

Member Function Documentation

◆ assessment()

ilIndividualAssessmentMember::assessment ( )

Get the ilObjIndividualAssessment corresponding to this membership.

Returns
ilObjIndividualAssessment

Definition at line 150 of file class.ilIndividualAssessmentMember.php.

151 {
152 return $this->iass;
153 }

References $iass.

Referenced by ilIndividualAssessmentPrimitiveInternalNotificator\withReciever().

+ Here is the caller graph for this function:

◆ assessmentId()

ilIndividualAssessmentMember::assessmentId ( )

Get the ilObjIndividualAssessment id corresponding to this membership.

Returns
int|string

Definition at line 140 of file class.ilIndividualAssessmentMember.php.

141 {
142 return $this->iass->getId();
143 }

Referenced by ilIndividualAssessmentLPInterface\updateLPStatusOfMember(), and ilIndividualAssessmentMembersStorageDB\updateMember().

+ Here is the caller graph for this function:

◆ changerId()

ilIndividualAssessmentMember::changerId ( )

◆ changeTime()

ilIndividualAssessmentMember::changeTime ( )

Get the datetime of change.

Returns
ilDateTime

Definition at line 88 of file class.ilIndividualAssessmentMember.php.

References $change_time.

◆ eventTime()

ilIndividualAssessmentMember::eventTime ( )

◆ examinerId()

ilIndividualAssessmentMember::examinerId ( )

◆ fileName()

ilIndividualAssessmentMember::fileName ( )

Get the name of the uploaded file.

Returns
string

Definition at line 417 of file class.ilIndividualAssessmentMember.php.

418 {
419 return $this->file_name;
420 }

Referenced by ilIndividualAssessmentMembersTableGUI\getAction(), ilIndividualAssessmentMembersTableGUI\getContent(), and ilIndividualAssessmentMembersStorageDB\updateMember().

+ Here is the caller graph for this function:

◆ finalized()

ilIndividualAssessmentMember::finalized ( )

◆ firstname()

ilIndividualAssessmentMember::firstname ( )

Get the examinee firstname corresponding to this membership.

Returns
int|string

Definition at line 333 of file class.ilIndividualAssessmentMember.php.

334 {
335 return $this->usr->getFirstname();
336 }

Referenced by ilIndividualAssessmentMembersTableGUI\getHeadline().

+ Here is the caller graph for this function:

◆ id()

ilIndividualAssessmentMember::id ( )

Get the user id corresponding to this membership.

Returns
int|string

Definition at line 130 of file class.ilIndividualAssessmentMember.php.

131 {
132 return $this->usr->getId();
133 }

Referenced by ilIndividualAssessmentMembersTableGUI\getAction(), ilIndividualAssessmentMembersTableGUI\getContent(), ilIndividualAssessmentMembersTableGUI\getFurtherFields(), ilIndividualAssessmentLPInterface\updateLPStatusOfMember(), and ilIndividualAssessmentMembersStorageDB\updateMember().

+ Here is the caller graph for this function:

◆ internalNote()

ilIndividualAssessmentMember::internalNote ( )

◆ lastname()

ilIndividualAssessmentMember::lastname ( )

Get the examinee lastname corresponding to this membership.

Returns
int|string

Definition at line 323 of file class.ilIndividualAssessmentMember.php.

324 {
325 return $this->usr->getLastname();
326 }

Referenced by ilIndividualAssessmentMembersTableGUI\getHeadline().

+ Here is the caller graph for this function:

◆ login()

ilIndividualAssessmentMember::login ( )

Get the examinee login corresponding to this membership.

Returns
int|string

Definition at line 343 of file class.ilIndividualAssessmentMember.php.

344 {
345 return $this->usr->getLogin();
346 }

◆ LPStatus()

ilIndividualAssessmentMember::LPStatus ( )

Get the LP-status corresponding to this membership.

Returns
int|string

Definition at line 363 of file class.ilIndividualAssessmentMember.php.

References $lp_status.

Referenced by ilIndividualAssessmentMemberGUI\fillForm(), ilIndividualAssessmentMembersTableGUI\getSubheadline(), and ilIndividualAssessmentMembersStorageDB\updateMember().

+ Here is the caller graph for this function:

◆ LPStatusValid()

◆ mayBeFinalized()

ilIndividualAssessmentMember::mayBeFinalized ( )

Can this membership be finalized?

Returns
bool

Definition at line 170 of file class.ilIndividualAssessmentMember.php.

171 {
172 if ($this->iass->getSettings()->fileRequired() && (string) $this->file_name === '') {
173 return false;
174 }
175 return ((string) $this->lp_status === (string) ilIndividualAssessmentMembers::LP_COMPLETED
176 || (string) $this->lp_status === (string) ilIndividualAssessmentMembers::LP_FAILED)
177 && !$this->finalized();
178 }

References finalized(), ilIndividualAssessmentMembers\LP_COMPLETED, and ilIndividualAssessmentMembers\LP_FAILED.

Referenced by withFinalized().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ maybeSendNotification()

ilIndividualAssessmentMember::maybeSendNotification ( ilIndividualAssessmentNotificator  $notificator)

Notify a user, if he is supposed to be notified, using some notificator object.

Parameters
ilIndividualAssessmentNotificator$notificator
Returns
ilIndividualAssessmentMember $this

Definition at line 110 of file class.ilIndividualAssessmentMember.php.

111 {
112 if (!$this->finalized()) {
113 throw new ilIndividualAssessmentException('must finalize before notification');
114 }
115 if ($this->notify) {
116 $notificator = (string) $this->lp_status === (string) ilIndividualAssessmentMembers::LP_COMPLETED ?
117 $notificator->withOccasionCompleted() :
118 $notificator->withOccasionFailed();
119 $notificator->withReciever($this)->send();
120 $this->notification_ts = time();
121 }
122 return $this;
123 }
withOccasionFailed()
Set message mode to failed.
withOccasionCompleted()
Set message mode to completed.
withReciever(ilIndividualAssessmentMember $member)
Define the member, that should recieve the message.

References finalized(), ilIndividualAssessmentMembers\LP_COMPLETED, notify(), ilIndividualAssessmentNotificator\withOccasionCompleted(), ilIndividualAssessmentNotificator\withOccasionFailed(), and ilIndividualAssessmentNotificator\withReciever().

+ Here is the call graph for this function:

◆ name()

ilIndividualAssessmentMember::name ( )

Get the examinee name corresponding to this membership.

Returns
int|string

Definition at line 353 of file class.ilIndividualAssessmentMember.php.

354 {
355 return $this->usr->getFullname();
356 }

Referenced by ilIndividualAssessmentMemberGUI\fillForm().

+ Here is the caller graph for this function:

◆ notificationTS()

ilIndividualAssessmentMember::notificationTS ( )

Get the timestamp, at which the notification was sent.

Returns
int|string

Definition at line 388 of file class.ilIndividualAssessmentMember.php.

References $notification_ts.

Referenced by ilIndividualAssessmentMembersStorageDB\updateMember().

+ Here is the caller graph for this function:

◆ notify()

ilIndividualAssessmentMember::notify ( )

Will the user be notified after finalization?

Returns
bool

Definition at line 98 of file class.ilIndividualAssessmentMember.php.

References $notify.

Referenced by __construct(), ilIndividualAssessmentMemberGUI\fillForm(), maybeSendNotification(), and ilIndividualAssessmentMembersStorageDB\updateMember().

+ Here is the caller graph for this function:

◆ place()

ilIndividualAssessmentMember::place ( )

Get place where ia was held.

Returns
string

Definition at line 398 of file class.ilIndividualAssessmentMember.php.

References $place.

Referenced by __construct(), ilIndividualAssessmentMemberGUI\fillForm(), ilIndividualAssessmentMembersTableGUI\getFurtherFields(), and ilIndividualAssessmentMembersStorageDB\updateMember().

+ Here is the caller graph for this function:

◆ record()

ilIndividualAssessmentMember::record ( )

◆ viewFile()

ilIndividualAssessmentMember::viewFile ( )

Can user see the uploaded file.

Returns
boolean

Definition at line 442 of file class.ilIndividualAssessmentMember.php.

443 {
444 return $this->view_file;
445 }

Referenced by ilIndividualAssessmentMemberGUI\fillForm(), and ilIndividualAssessmentMembersStorageDB\updateMember().

+ Here is the caller graph for this function:

◆ withChangerId()

ilIndividualAssessmentMember::withChangerId (   $changer_id)

Clone this object and set an changer_id.

Parameters
int | string$changer_id
Returns
ilIndividualAssessmentMember

Definition at line 257 of file class.ilIndividualAssessmentMember.php.

258 {
259 assert('is_numeric($changer_id)');
260 assert('ilObjUser::_exists($changer_id)');
261 $clone = clone $this;
262 $clone->changer_id = $changer_id;
263 return $clone;
264 }

References $changer_id.

Referenced by ilIndividualAssessmentMemberGUI\updateDataInMemberByArray().

+ Here is the caller graph for this function:

◆ withChangeTime()

ilIndividualAssessmentMember::withChangeTime (   $change_time)

Clone this object and set an change time.

Parameters
ilDateTime  |  null$change_time
Returns
ilManualAssessmentMember

Definition at line 272 of file class.ilIndividualAssessmentMember.php.

273 {
274 assert('$change_time instanceof ilDateTime || is_null($change_time)');
275 $clone = clone $this;
276 $clone->change_time = $change_time;
277 return $clone;
278 }

References $change_time.

◆ withEventTime()

ilIndividualAssessmentMember::withEventTime (   $event_time)

Clone this object and set an internal note.

Parameters
ilDate  |  null$internal_note
Returns
ilManualAssessmentMember

Definition at line 228 of file class.ilIndividualAssessmentMember.php.

229 {
230 assert($event_time instanceof ilDate || is_null($event_time));
231 $clone = clone $this;
232 $clone->event_time = $event_time;
233 return $clone;
234 }

References $event_time.

Referenced by ilIndividualAssessmentMemberGUI\updateDataInMemberByArray().

+ Here is the caller graph for this function:

◆ withExaminerId()

ilIndividualAssessmentMember::withExaminerId (   $examiner_id)

Clone this object and set an examiner_id.

Parameters
int | string$examiner_id
Returns
ilIndividualAssessmentMember

Definition at line 242 of file class.ilIndividualAssessmentMember.php.

243 {
244 assert(is_numeric($examiner_id));
246 $clone = clone $this;
247 $clone->examiner_id = $examiner_id;
248 return $clone;
249 }
static _exists($a_id, $a_reference=false, $a_type=null)
checks if an object exists in object_data@access public

References $examiner_id, and ilObject\_exists().

Referenced by ilIndividualAssessmentMemberGUI\updateDataInMemberByArray().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ withFileName()

ilIndividualAssessmentMember::withFileName (   $file_name)

Set the name of the file.

Parameters
string$file_name
Returns
ilManualAssessmentMember

Definition at line 429 of file class.ilIndividualAssessmentMember.php.

430 {
431 assert(is_string($file_name));
432 $clone = clone $this;
433 $clone->file_name = $file_name;
434 return $clone;
435 }

Referenced by ilIndividualAssessmentMemberGUI\updateDataInMemberByArray().

+ Here is the caller graph for this function:

◆ withFinalized()

ilIndividualAssessmentMember::withFinalized ( )

Clone this object and finalize.

Returns
ilIndividualAssessmentMember

Definition at line 373 of file class.ilIndividualAssessmentMember.php.

374 {
375 if ($this->mayBeFinalized()) {
376 $clone = clone $this;
377 $clone->finalized = 1;
378 return $clone;
379 }
380 throw new ilIndividualAssessmentException('user cant be finalized');
381 }
mayBeFinalized()
Can this membership be finalized?

References mayBeFinalized().

+ Here is the call graph for this function:

◆ withInternalNote()

ilIndividualAssessmentMember::withInternalNote (   $internal_note)

Clone this object and set an internal note.

Parameters
string$internal_note
Returns
ilIndividualAssessmentMember

Definition at line 200 of file class.ilIndividualAssessmentMember.php.

201 {
202 assert(is_string($internal_note) || $internal_note === null);
203 $clone = clone $this;
204 $clone->internal_note = $internal_note;
205 return $clone;
206 }

References $internal_note.

◆ withLPStatus()

ilIndividualAssessmentMember::withLPStatus (   $lp_status)

Clone this object and set LP-status.

Parameters
string$lp_status
Returns
ilIndividualAssessmentMember

Definition at line 308 of file class.ilIndividualAssessmentMember.php.

309 {
310 if ($this->LPStatusValid($lp_status)) {
311 $clone = clone $this;
312 $clone->lp_status = $lp_status;
313 return $clone;
314 }
315 throw new ilIndividualAssessmentException('user allready finalized or invalid learning progress status');
316 }

References $lp_status, and LPStatusValid().

+ Here is the call graph for this function:

◆ withNotify()

ilIndividualAssessmentMember::withNotify (   $notify)

Clone this object and set wether the examinee should be notified.

Parameters
bool$notify
Returns
ilIndividualAssessmentMember

Definition at line 286 of file class.ilIndividualAssessmentMember.php.

287 {
288 assert(is_bool($notify));
289 $clone = clone $this;
290 $clone->notify = (bool) $notify;
291 return $clone;
292 }

References $notify.

Referenced by ilIndividualAssessmentMemberGUI\updateDataInMemberByArray().

+ Here is the caller graph for this function:

◆ withPlace()

ilIndividualAssessmentMember::withPlace (   $place)

Clone this object and set an internal note.

Parameters
string$place
Returns
ilManualAssessmentMember

Definition at line 214 of file class.ilIndividualAssessmentMember.php.

215 {
216 assert(is_string($place) || is_null($place));
217 $clone = clone $this;
218 $clone->place = $place;
219 return $clone;
220 }

References $place.

◆ withRecord()

ilIndividualAssessmentMember::withRecord (   $record)

Clone this object and set a record.

Parameters
string$record
Returns
ilIndividualAssessmentMember

Definition at line 186 of file class.ilIndividualAssessmentMember.php.

187 {
188 assert(is_string($record) || $record === null);
189 $clone = clone $this;
190 $clone->record = $record;
191 return $clone;
192 }

References $record.

Referenced by ilIndividualAssessmentMemberGUI\updateDataInMemberByArray().

+ Here is the caller graph for this function:

◆ withViewFile()

ilIndividualAssessmentMember::withViewFile (   $view_file)

Set user can view uploaded file.

Parameters
boolean$view_file
Returns
ilManualAssessmentMember

Definition at line 454 of file class.ilIndividualAssessmentMember.php.

455 {
456 assert(is_bool($view_file));
457 $clone = clone $this;
458 $clone->view_file = $view_file;
459 return $clone;
460 }

Field Documentation

◆ $change_time

ilIndividualAssessmentMember::$change_time
protected

Definition at line 26 of file class.ilIndividualAssessmentMember.php.

Referenced by changeTime(), and withChangeTime().

◆ $changer_id

ilIndividualAssessmentMember::$changer_id
protected

Definition at line 25 of file class.ilIndividualAssessmentMember.php.

Referenced by changerId(), and withChangerId().

◆ $event_time

ilIndividualAssessmentMember::$event_time
protected

Definition at line 24 of file class.ilIndividualAssessmentMember.php.

Referenced by eventTime(), and withEventTime().

◆ $examiner_id

ilIndividualAssessmentMember::$examiner_id
protected

Definition at line 18 of file class.ilIndividualAssessmentMember.php.

Referenced by examinerId(), and withExaminerId().

◆ $finalized

ilIndividualAssessmentMember::$finalized
protected

Definition at line 20 of file class.ilIndividualAssessmentMember.php.

◆ $iass

ilIndividualAssessmentMember::$iass
protected

Definition at line 13 of file class.ilIndividualAssessmentMember.php.

Referenced by __construct(), and assessment().

◆ $internal_note

ilIndividualAssessmentMember::$internal_note
protected

Definition at line 17 of file class.ilIndividualAssessmentMember.php.

Referenced by internalNote(), and withInternalNote().

◆ $lp_status

ilIndividualAssessmentMember::$lp_status
protected

Definition at line 22 of file class.ilIndividualAssessmentMember.php.

Referenced by LPStatus(), LPStatusValid(), and withLPStatus().

◆ $notification_ts

ilIndividualAssessmentMember::$notification_ts
protected

Definition at line 21 of file class.ilIndividualAssessmentMember.php.

Referenced by notificationTS().

◆ $notify

ilIndividualAssessmentMember::$notify
protected

Definition at line 19 of file class.ilIndividualAssessmentMember.php.

Referenced by notify(), and withNotify().

◆ $place

ilIndividualAssessmentMember::$place
protected

Definition at line 23 of file class.ilIndividualAssessmentMember.php.

Referenced by place(), and withPlace().

◆ $record

ilIndividualAssessmentMember::$record
protected

Definition at line 16 of file class.ilIndividualAssessmentMember.php.

Referenced by record(), and withRecord().

◆ $usr

ilIndividualAssessmentMember::$usr
protected

Definition at line 14 of file class.ilIndividualAssessmentMember.php.

Referenced by __construct().


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