8require_once
'Services/User/classes/class.ilObjUser.php';
9require_once
'Modules/IndividualAssessment/classes/class.ilObjIndividualAssessment.php';
10require_once
'Services/Tracking/classes/class.ilLPStatus.php';
44 return count($this->member_records);
51 return current($this->member_records);
54 public function key() {
55 return key($this->member_records);
60 next($this->member_records);
65 reset($this->member_records);
69 return $this->position <
count($this->member_records);
88 if(isset($record[self::FIELD_USR_ID])) {
89 if(!$this->
userExists($record[self::FIELD_USR_ID])
94 if(!in_array($record[self::FIELD_LEARNING_PROGRESS],
95 array(self::LP_NOT_ATTEMPTED, self::LP_FAILED, self::LP_COMPLETED, self::LP_IN_PROGRESS))) {
108 return isset($this->member_records[$usr_id]);
134 $clone = clone $this;
150 $clone = clone $this;
159 self::FIELD_USR_ID => $usr->
getId()
160 , self::FIELD_RECORD => $this->iass->getSettings()->recordTemplate()
161 , self::FIELD_NOTIFY => 0
164 , self::FIELD_LOGIN => $usr->
getLogin()
165 , self::FIELD_LEARNING_PROGRESS => self::LP_NOT_ATTEMPTED
166 , self::FIELD_EXAMINER_ID =>
null
167 , self::FIELD_EXAMINER_FIRSTNAME =>
null
168 , self::FIELD_EXAMINER_LASTNAME =>
null
169 , self::FIELD_INTERNAL_NOTE =>
null
170 , self::FIELD_FINALIZED => 0
182 $usr_id = $usr->
getId();
183 if(isset($this->member_records[$usr_id]) && (
string)$this->member_records[$usr_id][self::FIELD_FINALIZED] !==
"1") {
184 $clone = clone $this;
185 unset($clone->member_records[$usr->
getId()]);
198 return array_keys($this->member_records);
210 foreach($this as $usr_id => $record) {
211 if(!$current->userAllreadyMemberByUsrId($usr_id)) {
216 foreach($current as $usr_id => $record) {
An exception for terminatinating execution or to throw for unit testing.
Member administration related logic, add and remove members, get the list of all members,...
updateStorageAndRBAC(ilIndividualAssessmentMembersStorage $storage, IndividualAssessmentAccessHandler $access_handler)
Store the data to a persistent medium.
withAdditionalRecord(array $record)
Clone this and add an additional record.
const FIELD_INTERNAL_NOTE
membersIds()
Get the ids of all the users being member in this iass.
current()
Iterator Methods.
count()
Countable Methods.
const FIELD_EXAMINER_FIRSTNAME
const FIELD_NOTIFICATION_TS
withoutPresentUser(ilObjUser $usr)
Clone this andremove record corresponding to user.
const FIELD_LEARNING_PROGRESS
referencedObject()
Get the Individual assessment object that is corresponding to this.
userAllreadyMemberByUsrId($usr_id)
Check if a user with user_id is member of this.
buildNewRecordOfUser(ilObjUser $usr)
__construct(ilObjIndividualAssessment $iass)
const FIELD_EXAMINER_LASTNAME
withAdditionalUser(ilObjUser $usr)
Clone this and add an additional record created for user.
recordOK(array $record)
Check the validity of a record before adding it to this.
userAllreadyMember(ilObjUser $usr)
Check if a user is member of this.
const LP_STATUS_COMPLETED_NUM
const LP_STATUS_IN_PROGRESS_NUM
const LP_STATUS_NOT_ATTEMPTED_NUM
const LP_STATUS_FAILED_NUM
For the purpose of streamlining the grading and learning-process status definition outside of tests,...
getLastname()
get lastname @access public
getFirstname()
get firstname @access public
getLogin()
get login / username @access public
static _exists($a_id, $a_reference=false, $a_type=null)
checks if an object exists in object_data@access public
getId()
get object id @access public
Mechanic regarding the access controll and roles of an objcet goes here.
assignUserToMemberRole(ilObjUser $usr, ilObjIndividualAssessment $iass)
Assign a user to the member role at an Individual assessment.
deassignUserFromMemberRole(ilObjUser $usr, ilObjIndividualAssessment $iass)
Deasign a user from the member role at an Individual assessment.