8 require_once
'Services/User/classes/class.ilObjUser.php';
9 require_once
'Modules/IndividualAssessment/classes/class.ilObjIndividualAssessment.php';
10 require_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;
135 $clone->member_records[$record[self::FIELD_USR_ID]] = $record;
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) {
const LP_STATUS_COMPLETED_NUM
__construct(ilObjIndividualAssessment $iass)
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.
userAllreadyMember(ilObjUser $usr)
Check if a user is member of this.
getLogin()
get login / username public
For the purpose of streamlining the grading and learning-process status definition outside of tests...
const FIELD_INTERNAL_NOTE
current()
Iterator Methods.
getFirstname()
get firstname public
static _exists($a_id, $a_reference=false, $a_type=null)
checks if an object exists in object_data
referencedObject()
Get the Individual assessment object that is corresponding to this.
const LP_STATUS_IN_PROGRESS_NUM
withAdditionalRecord(array $record)
Clone this and add an additional record.
const FIELD_LEARNING_PROGRESS
recordOK(array $record)
Check the validity of a record before adding it to this.
Mechanic regarding the access controll and roles of an objcet goes here.
buildNewRecordOfUser(ilObjUser $usr)
withoutPresentUser(ilObjUser $usr)
Clone this andremove record corresponding to user.
getLastname()
get lastname public
getId()
get object id public
const FIELD_EXAMINER_FIRSTNAME
count()
Countable Methods.
const FIELD_NOTIFICATION_TS
Create styles array
The data for the language used.
const LP_STATUS_NOT_ATTEMPTED_NUM
withAdditionalUser(ilObjUser $usr)
Clone this and add an additional record created for user.
updateStorageAndRBAC(ilIndividualAssessmentMembersStorage $storage, IndividualAssessmentAccessHandler $access_handler)
Store the data to a persistent medium.
const FIELD_EXAMINER_LASTNAME
userAllreadyMemberByUsrId($usr_id)
Check if a user with user_id is member of this.
Member administration related logic, add and remove members, get the list of all members, etc.
membersIds()
Get the ids of all the users being member in this iass.
const LP_STATUS_FAILED_NUM