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';
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;
160 $clone->member_records[$record[self::FIELD_USR_ID]] = $record;
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) {
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
if(!array_key_exists('StateId', $_REQUEST)) $id
withAdditionalRecord(array $record)
Clone this and add an additional record.
const FIELD_LEARNING_PROGRESS
Interface ilOrgUnitPositionAndRBACAccessHandler.
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)
const FIELD_CHANGER_FIRSTNAME
const FIELD_USER_VIEW_FILE
withoutPresentUser(ilObjUser $usr)
Clone this andremove record corresponding to user.
const LP_ASSESSMENT_NOT_COMPLETED
getLastname()
get lastname public
getId()
get object id public
const FIELD_EXAMINER_FIRSTNAME
count()
Countable Methods.
const FIELD_NOTIFICATION_TS
const LP_STATUS_NOT_ATTEMPTED_NUM
withAccessHandling(ilOrgUnitPositionAndRBACAccessHandler $access_handler)
Get a collection like this, but only including users that are visible according to the supplied acces...
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
const FIELD_CHANGER_LASTNAME
withOnlyUsersByIds($keep_users_ids)
Remove all users that do no exist in list of given ids.
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.
filterUserIdsByRbacOrPositionOfCurrentUser($rbac_perm, $pos_perm, $ref_id, array $user_ids)
const LP_STATUS_FAILED_NUM