8require_once
'Services/User/classes/class.ilObjUser.php';
9require_once
'Modules/IndividualAssessment/classes/class.ilObjIndividualAssessment.php';
10require_once
'Services/Tracking/classes/class.ilLPStatus.php';
56 return count($this->member_records);
64 return current($this->member_records);
69 return key($this->member_records);
75 next($this->member_records);
81 reset($this->member_records);
86 return $this->position <
count($this->member_records);
107 if (isset($record[self::FIELD_USR_ID])) {
108 if (!$this->
userExists($record[self::FIELD_USR_ID])
114 $record[self::FIELD_LEARNING_PROGRESS],
115 array(self::LP_NOT_ATTEMPTED, self::LP_FAILED, self::LP_COMPLETED, self::LP_IN_PROGRESS)
130 return isset($this->member_records[$usr_id]);
159 $clone = clone $this;
176 $clone = clone $this;
186 self::FIELD_USR_ID => $usr->
getId()
187 , self::FIELD_RECORD => $this->iass->getSettings()->recordTemplate()
188 , self::FIELD_NOTIFY => 0
191 , self::FIELD_LOGIN => $usr->
getLogin()
192 , self::FIELD_LEARNING_PROGRESS => self::LP_NOT_ATTEMPTED
193 , self::FIELD_EXAMINER_ID =>
null
194 , self::FIELD_EXAMINER_FIRSTNAME =>
null
195 , self::FIELD_EXAMINER_LASTNAME =>
null
196 , self::FIELD_INTERNAL_NOTE =>
null
197 , self::FIELD_FILE_NAME =>
null
198 , self::FIELD_USER_VIEW_FILE =>
false
199 , self::FIELD_FINALIZED => 0
200 , self::FIELD_CHANGER_ID =>
null
201 , self::FIELD_CHANGER_FIRSTNAME =>
null
202 , self::FIELD_CHANGER_LASTNAME =>
null
215 $usr_id = $usr->
getId();
216 if (isset($this->member_records[$usr_id]) && (
string) $this->member_records[$usr_id][self::FIELD_FINALIZED] !==
"1") {
217 $clone = clone $this;
218 unset($clone->member_records[$usr->
getId()]);
232 $clone = clone $this;
234 $remove = array_diff($this->
membersIds(), $keep_users_ids);
235 foreach ($remove as
$id) {
236 unset($clone->member_records[
$id]);
253 "read_learning_progress",
254 "read_learning_progress",
255 $this->referencedObject()->getRefId(),
269 return array_keys($this->member_records);
282 foreach ($this as $usr_id => $record) {
283 if (!
$current->userAllreadyMemberByUsrId($usr_id)) {
288 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,...
withAccessHandling(ilOrgUnitPositionAndRBACAccessHandler $access_handler)
Get a collection like this, but only including users that are visible according to the supplied acces...
updateStorageAndRBAC(ilIndividualAssessmentMembersStorage $storage, IndividualAssessmentAccessHandler $access_handler)
Store the data to a persistent medium.
withAdditionalRecord(array $record)
Clone this and add an additional record.
withOnlyUsersByIds($keep_users_ids)
Remove all users that do no exist in list of given ids.
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_CHANGER_LASTNAME
const FIELD_USER_VIEW_FILE
const FIELD_CHANGER_FIRSTNAME
const LP_ASSESSMENT_NOT_COMPLETED
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
if(!array_key_exists('StateId', $_REQUEST)) $id
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.
Interface ilOrgUnitPositionAndRBACAccessHandler.
filterUserIdsByRbacOrPositionOfCurrentUser($rbac_perm, $pos_perm, $ref_id, array $user_ids)