ILIAS  release_5-2 Revision v5.2.25-18-g3f80b828510
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...
 
 notify ()
 
 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...
 
 withExaminerId ($examiner_id)
 Clone this object and set an examiner_id. 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...
 

Protected Member Functions

 LPStatusValid ($lp_status)
 

Protected Attributes

 $iass
 
 $usr
 
 $record
 
 $internal_note
 
 $examiner_id
 
 $notify
 
 $finalized
 
 $notification_ts
 
 $lp_status
 

Detailed Description

Constructor & Destructor Documentation

◆ __construct()

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

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

22 {
23
31 $this->iass = $iass;
32 $this->usr = $usr;
33 }
finalized()
Is this membership allready finalized?

References $data, $iass, $usr, ilIndividualAssessmentMembers\FIELD_EXAMINER_ID, ilIndividualAssessmentMembers\FIELD_FINALIZED, ilIndividualAssessmentMembers\FIELD_INTERNAL_NOTE, ilIndividualAssessmentMembers\FIELD_LEARNING_PROGRESS, ilIndividualAssessmentMembers\FIELD_NOTIFICATION_TS, ilIndividualAssessmentMembers\FIELD_NOTIFY, ilIndividualAssessmentMembers\FIELD_RECORD, finalized(), notify(), 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 111 of file class.ilIndividualAssessmentMember.php.

111 {
112 return $this->iass;
113 }

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 102 of file class.ilIndividualAssessmentMember.php.

102 {
103 return $this->iass->getId();
104 }

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

+ Here is the caller graph for this function:

◆ examinerId()

ilIndividualAssessmentMember::examinerId ( )

Get the user id of the examiner.

Returns
int|string

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

References $examiner_id.

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

+ Here is the caller graph for this function:

◆ finalized()

ilIndividualAssessmentMember::finalized ( )

Is this membership allready finalized?

Returns
bool

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

120 {
121 return (string)$this->finalized === "1" ? true : false;
122 }

References finalized().

Referenced by __construct(), finalized(), mayBeFinalized(), maybeSendNotification(), ilIndividualAssessmentMembersStorageDB\updateMember(), withExaminerId(), withInternalNote(), withLPStatus(), withNotify(), and withRecord().

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

◆ firstname()

ilIndividualAssessmentMember::firstname ( )

Get the examinee firstname corresponding to this membership.

Returns
int|string

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

236 {
237 return $this->usr->getFirstname();
238 }

◆ id()

ilIndividualAssessmentMember::id ( )

Get the user id corresponding to this membership.

Returns
int|string

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

93 {
94 return $this->usr->getId();
95 }

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

+ Here is the caller graph for this function:

◆ internalNote()

ilIndividualAssessmentMember::internalNote ( )
Returns
string

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

References $internal_note.

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

+ Here is the caller graph for this function:

◆ lastname()

ilIndividualAssessmentMember::lastname ( )

Get the examinee lastname corresponding to this membership.

Returns
int|string

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

227 {
228 return $this->usr->getLastname();
229 }

◆ login()

ilIndividualAssessmentMember::login ( )

Get the examinee login corresponding to this membership.

Returns
int|string

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

245 {
246 return $this->usr->getLogin();
247 }

◆ LPStatus()

ilIndividualAssessmentMember::LPStatus ( )

Get the LP-status corresponding to this membership.

Returns
int|string

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

References $lp_status.

Referenced by ilIndividualAssessmentMemberGUI\fillForm(), 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 129 of file class.ilIndividualAssessmentMember.php.

129 {
130 return ((string)$this->lp_status === (string)ilIndividualAssessmentMembers::LP_COMPLETED
131 ||(string)$this->lp_status === (string)ilIndividualAssessmentMembers::LP_FAILED)
132 && !$this->finalized();
133 }

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 74 of file class.ilIndividualAssessmentMember.php.

74 {
75 if(!$this->finalized()) {
76 throw new ilIndividualAssessmentException('must finalize before notification');
77 }
78 if($this->notify) {
79 $notificator = (string)$this->lp_status === (string)ilIndividualAssessmentMembers::LP_COMPLETED ?
80 $notificator->withOccasionCompleted() :
81 $notificator->withOccasionFailed();
82 $notificator->withReciever($this)->send();
83 $this->notification_ts = time();
84 }
85 return $this;
86 }
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 254 of file class.ilIndividualAssessmentMember.php.

254 {
255 return $this->usr->getFullname();
256 }

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 286 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 63 of file class.ilIndividualAssessmentMember.php.

References $notify.

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

+ Here is the caller graph for this function:

◆ record()

ilIndividualAssessmentMember::record ( )
Returns
string

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

References $record.

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

+ 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 173 of file class.ilIndividualAssessmentMember.php.

173 {
174 assert('is_numeric($examiner_id)');
175 if(!$this->finalized()) {
176 assert('ilObjUser::_exists($examiner_id)');
177 $clone = clone $this;
178 $clone->examiner_id = $examiner_id;
179 return $clone;
180 }
181 throw new ilIndividualAssessmentException('user allready finalized');
182 }

References $examiner_id, and finalized().

+ Here is the call graph for this function:

◆ withFinalized()

ilIndividualAssessmentMember::withFinalized ( )

Clone this object and finalize.

Returns
ilIndividualAssessmentMember

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

272 {
273 if($this->mayBeFinalized()) {
274 $clone = clone $this;
275 $clone->finalized = 1;
276 return $clone;
277 }
278 throw new ilIndividualAssessmentException('user cant be finalized');
279 }
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 157 of file class.ilIndividualAssessmentMember.php.

157 {
158 assert('is_string($internal_note) || $internal_note === null');
159 if(!$this->finalized()) {
160 $clone = clone $this;
161 $clone->internal_note = $internal_note;
162 return $clone;
163 }
164 throw new ilIndividualAssessmentException('user allready finalized');
165 }

References $internal_note, and finalized().

+ Here is the call graph for this function:

◆ withLPStatus()

ilIndividualAssessmentMember::withLPStatus (   $lp_status)

Clone this object and set LP-status.

Parameters
string$lp_status
Returns
ilIndividualAssessmentMember

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

213 {
214 if(!$this->finalized() && $this->LPStatusValid($lp_status)) {
215 $clone = clone $this;
216 $clone->lp_status = $lp_status;
217 return $clone;
218 }
219 throw new ilIndividualAssessmentException('user allready finalized or invalid learning progress status');
220 }

References $lp_status, finalized(), 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 190 of file class.ilIndividualAssessmentMember.php.

190 {
191 assert('is_bool($notify)');
192 if(!$this->finalized()) {
193 $clone = clone $this;
194 $clone->notify = (bool)$notify;
195 return $clone;
196 }
197 throw new ilIndividualAssessmentException('user allready finalized');
198 }

References $notify, and finalized().

+ Here is the call graph for this function:

◆ withRecord()

ilIndividualAssessmentMember::withRecord (   $record)

Clone this object and set a record.

Parameters
string$record
Returns
ilIndividualAssessmentMember

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

141 {
142 assert('is_string($record) || $record === null');
143 if(!$this->finalized()) {
144 $clone = clone $this;
145 $clone->record = $record;
146 return $clone;
147 }
148 throw new ilIndividualAssessmentException('user allready finalized');
149 }

References $record, and finalized().

Referenced by ilIndividualAssessmentMemberGUI\updateDataInMemberByArray().

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

Field Documentation

◆ $examiner_id

ilIndividualAssessmentMember::$examiner_id
protected

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

Referenced by examinerId(), and withExaminerId().

◆ $finalized

ilIndividualAssessmentMember::$finalized
protected

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

◆ $iass

ilIndividualAssessmentMember::$iass
protected

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

Referenced by __construct(), and assessment().

◆ $internal_note

ilIndividualAssessmentMember::$internal_note
protected

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

Referenced by internalNote(), and withInternalNote().

◆ $lp_status

ilIndividualAssessmentMember::$lp_status
protected

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

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

◆ $notification_ts

ilIndividualAssessmentMember::$notification_ts
protected

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

Referenced by notificationTS().

◆ $notify

ilIndividualAssessmentMember::$notify
protected

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

Referenced by notify(), and withNotify().

◆ $record

ilIndividualAssessmentMember::$record
protected

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

Referenced by record(), and withRecord().

◆ $usr

ilIndividualAssessmentMember::$usr
protected

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

Referenced by __construct().


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