ILIAS
trunk Revision v11.0_alpha-2638-g80c1d007f79
|
Assignments are relations of users to a PRG; They hold progress-information for (sub-)nodes of the PRG-tree. More...
Public Member Functions | |
__construct (protected ilDBInterface $db, protected ilTree $tree, protected ilStudyProgrammeSettingsRepository $settings_repo, protected PRGEventsDelayed $events, ilExportFieldsInfo $user_field_info) | |
getDashboardInstancesforUser (int $usr_id) | |
createFor (int $prg_obj_id, int $usr_id, int $assigning_usr_id) | |
store (ilPRGAssignment $assignment) | |
delete (ilPRGAssignment $assignment) | |
deleteAllAssignmentsForProgrammeId (int $prg_obj_id) | |
get (int $id) | |
getForUser (int $usr_id) | |
get all assignments for a user More... | |
getForUserOnNode (int $usr_id, int $root_prg_obj_id) | |
getAllForNodeIsContained (int $prg_obj_id, ?array $user_filter=null, ?ilPRGAssignmentFilter $custom_filters=null) | |
get all assignments for all (or given) users, where the given node is part of the assignment More... | |
countAllForNodeIsContained (int $prg_obj_id, ?array $user_filter=null, ?ilPRGAssignmentFilter $custom_filters=null) | |
Count all assignments for all (or given) users, where the given node is part of the assignment. More... | |
getAllForSpecificNode (int $prg_obj_id, ?array $user_filter=null) | |
get all assignments for all (or given) users, where the given node is the root-node of the assignment More... | |
getPassedDeadline (\DateTimeImmutable $deadline) | |
getAboutToExpire (array $programmes_and_due, bool $discard_formerly_notified=true) | |
getExpiredAndNotInvalidated () | |
getRiskyToFail (array $programmes_and_due, bool $discard_formerly_notified=true) | |
storeExpiryInfoSentFor (ilPRGAssignment $ass) | |
resetExpiryInfoSentFor (ilPRGAssignment $ass) | |
storeRiskyToFailSentFor (ilPRGAssignment $ass) | |
resetRiskyToFailSentFor (ilPRGAssignment $ass) | |
getLatestAssignment (int $root_prg_obj_id, int $usr_id) | |
Get the user's assignment on a prg that was created last. More... | |
getLongestValidAssignment (int $root_prg_obj_id, int $usr_id) | |
Get the user's assignment on a prg with the longest lasting qualification. More... | |
getCertificateRelevantAssignmentIds (int $prg_obj_id, int ... $usr_id) | |
Protected Member Functions | |
deleteAllOrphanedProgresses () | |
query ($filter) | |
nextId () | |
count (array $filter) | |
read (array $filter) | |
prebuildProgressesForAssingment (int $assignment_id) | |
assignmentByRow (array $row) | |
buildProgressTreeFor (int $node_obj_id) | |
getRefIdFor (int $obj_id) | |
getObjIdFor (int $ref_id) | |
buildProgressByRow (array $row) | |
interimOrguLookup (int $usr_id) | |
buildUserInformation (array $row) | |
insertAssignmentRowDB (array $row) | |
updateAssignmentRowDB (array $values) | |
storeProgressRow (int $assignment_id, int $usr_id, ilPRGProgress $pgs) | |
Protected Attributes | |
array | $user_data_fields |
array | $progresses = [] |
<id => ilPRGProgress> More... | |
Assignments are relations of users to a PRG; They hold progress-information for (sub-)nodes of the PRG-tree.
Definition at line 25 of file class.ilPRGAssignmentDBRepository.php.
ilPRGAssignmentDBRepository::__construct | ( | protected ilDBInterface | $db, |
protected ilTree | $tree, | ||
protected ilStudyProgrammeSettingsRepository | $settings_repo, | ||
protected PRGEventsDelayed | $events, | ||
ilExportFieldsInfo | $user_field_info | ||
) |
Definition at line 66 of file class.ilPRGAssignmentDBRepository.php.
References ilExportFieldsInfo\getSelectableFieldsInfo(), and ilPRGUserInformation\MANDATORY_FIELDS.
|
protected |
Definition at line 481 of file class.ilPRGAssignmentDBRepository.php.
References buildProgressTreeFor(), buildUserInformation(), ilPRGAssignment\DATE_TIME_FORMAT, ILIAS\Repository\int(), and null.
Referenced by createFor(), and read().
|
protected |
Definition at line 554 of file class.ilPRGAssignmentDBRepository.php.
References ilPRGProgress\DATE_FORMAT, ilPRGProgress\DATE_TIME_FORMAT, and null.
Referenced by prebuildProgressesForAssingment().
|
protected |
Definition at line 516 of file class.ilPRGAssignmentDBRepository.php.
References $c, and ilContainerReference\_lookupTargetId().
Referenced by assignmentByRow().
|
protected |
Definition at line 617 of file class.ilPRGAssignmentDBRepository.php.
References interimOrguLookup().
Referenced by assignmentByRow().
|
protected |
Definition at line 443 of file class.ilPRGAssignmentDBRepository.php.
Referenced by countAllForNodeIsContained(), getAboutToExpire(), getRefIdFor(), and getRiskyToFail().
ilPRGAssignmentDBRepository::countAllForNodeIsContained | ( | int | $prg_obj_id, |
?array | $user_filter = null , |
||
?ilPRGAssignmentFilter | $custom_filters = null |
||
) |
Count all assignments for all (or given) users, where the given node is part of the assignment.
Implements PRGAssignmentRepository.
Definition at line 226 of file class.ilPRGAssignmentDBRepository.php.
References count().
ilPRGAssignmentDBRepository::createFor | ( | int | $prg_obj_id, |
int | $usr_id, | ||
int | $assigning_usr_id | ||
) |
Implements PRGAssignmentRepository.
Definition at line 86 of file class.ilPRGAssignmentDBRepository.php.
References $res, ilObject\_lookupType(), assignmentByRow(), insertAssignmentRowDB(), nextId(), ilPRGAssignment\NO_RESTARTED_ASSIGNMENT, ilUtil\now(), and null.
ilPRGAssignmentDBRepository::delete | ( | ilPRGAssignment | $assignment | ) |
Implements PRGAssignmentRepository.
Definition at line 145 of file class.ilPRGAssignmentDBRepository.php.
References $ass_id.
Referenced by ilObjStudyProgramme\removeMemberFromProgrammes().
ilPRGAssignmentDBRepository::deleteAllAssignmentsForProgrammeId | ( | int | $prg_obj_id | ) |
Implements PRGAssignmentRepository.
Definition at line 157 of file class.ilPRGAssignmentDBRepository.php.
References deleteAllOrphanedProgresses().
|
protected |
Definition at line 164 of file class.ilPRGAssignmentDBRepository.php.
Referenced by deleteAllAssignmentsForProgrammeId().
ilPRGAssignmentDBRepository::get | ( | int | $id | ) |
Implements PRGAssignmentRepository.
Definition at line 175 of file class.ilPRGAssignmentDBRepository.php.
ilPRGAssignmentDBRepository::getAboutToExpire | ( | array | $programmes_and_due, |
bool | $discard_formerly_notified = true |
||
) |
array | <int $prg_obj_id, DateTimeImmutable $due> |
Implements PRGAssignmentRepository.
Definition at line 285 of file class.ilPRGAssignmentDBRepository.php.
References count(), and read().
ilPRGAssignmentDBRepository::getAllForNodeIsContained | ( | int | $prg_obj_id, |
?array | $user_filter = null , |
||
?ilPRGAssignmentFilter | $custom_filters = null |
||
) |
get all assignments for all (or given) users, where the given node is part of the assignment
Implements PRGAssignmentRepository.
Definition at line 205 of file class.ilPRGAssignmentDBRepository.php.
References read().
ilPRGAssignmentDBRepository::getAllForSpecificNode | ( | int | $prg_obj_id, |
?array | $user_filter = null |
||
) |
get all assignments for all (or given) users, where the given node is the root-node of the assignment
Implements PRGAssignmentRepository.
Definition at line 243 of file class.ilPRGAssignmentDBRepository.php.
References read().
ilPRGAssignmentDBRepository::getCertificateRelevantAssignmentIds | ( | int | $prg_obj_id, |
int ... | $usr_id | ||
) |
Definition at line 850 of file class.ilPRGAssignmentDBRepository.php.
References $r, $res, ilPRGProgress\STATUS_ACCREDITED, and ilPRGProgress\STATUS_COMPLETED.
ilPRGAssignmentDBRepository::getDashboardInstancesforUser | ( | int | $usr_id | ) |
Implements PRGAssignmentRepository.
Definition at line 79 of file class.ilPRGAssignmentDBRepository.php.
References getForUser().
ilPRGAssignmentDBRepository::getExpiredAndNotInvalidated | ( | ) |
Implements PRGAssignmentRepository.
Definition at line 320 of file class.ilPRGAssignmentDBRepository.php.
References read(), ilPRGProgress\STATUS_ACCREDITED, and ilPRGProgress\STATUS_COMPLETED.
ilPRGAssignmentDBRepository::getForUser | ( | int | $usr_id | ) |
get all assignments for a user
Implements PRGAssignmentRepository.
Definition at line 184 of file class.ilPRGAssignmentDBRepository.php.
References read().
Referenced by getDashboardInstancesforUser().
ilPRGAssignmentDBRepository::getForUserOnNode | ( | int | $usr_id, |
int | $root_prg_obj_id | ||
) |
Definition at line 194 of file class.ilPRGAssignmentDBRepository.php.
References read().
Referenced by getLatestAssignment(), and getLongestValidAssignment().
ilPRGAssignmentDBRepository::getLatestAssignment | ( | int | $root_prg_obj_id, |
int | $usr_id | ||
) |
Get the user's assignment on a prg that was created last.
Implements PRGAssignmentRepository.
Definition at line 802 of file class.ilPRGAssignmentDBRepository.php.
References Vendor\Package\$a, Vendor\Package\$b, getForUserOnNode(), ilPRGAssignment\getProgressTree(), and null.
ilPRGAssignmentDBRepository::getLongestValidAssignment | ( | int | $root_prg_obj_id, |
int | $usr_id | ||
) |
Get the user's assignment on a prg with the longest lasting qualification.
If there is more than one assignment with e.g. unlimited qualification, the valid assignment that was created (not finished) last is returned.
Implements PRGAssignmentRepository.
Definition at line 817 of file class.ilPRGAssignmentDBRepository.php.
References Vendor\Package\$a, Vendor\Package\$b, $valid, getForUserOnNode(), ilPRGAssignment\getProgressTree(), and null.
|
protected |
Definition at line 549 of file class.ilPRGAssignmentDBRepository.php.
References ilObject\_lookupObjectId().
ilPRGAssignmentDBRepository::getPassedDeadline | ( | \DateTimeImmutable | $deadline | ) |
Implements PRGAssignmentRepository.
Definition at line 258 of file class.ilPRGAssignmentDBRepository.php.
References ilPRGProgress\DATE_FORMAT, read(), ilPRGProgress\STATUS_ACCREDITED, and ilPRGProgress\STATUS_IN_PROGRESS.
|
protected |
Definition at line 541 of file class.ilPRGAssignmentDBRepository.php.
References ilObject\_getAllReferences(), and count().
ilPRGAssignmentDBRepository::getRiskyToFail | ( | array | $programmes_and_due, |
bool | $discard_formerly_notified = true |
||
) |
Definition at line 344 of file class.ilPRGAssignmentDBRepository.php.
References count(), ilPRGProgress\DATE_FORMAT, read(), ilPRGProgress\STATUS_ACCREDITED, ilPRGProgress\STATUS_COMPLETED, and ilPRGProgress\STATUS_NOT_RELEVANT.
|
protected |
Definition at line 643 of file class.ilPRGAssignmentDBRepository.php.
Referenced by createFor().
|
protected |
Definition at line 600 of file class.ilPRGAssignmentDBRepository.php.
References ilObject\_lookupObjId(), ilObject\_lookupTitle(), and OrgUnit\Positions\UserAssignment\ilOrgUnitUserAssignmentRepository\getInstance().
Referenced by buildUserInformation().
|
protected |
Definition at line 438 of file class.ilPRGAssignmentDBRepository.php.
Referenced by createFor().
|
protected |
Definition at line 470 of file class.ilPRGAssignmentDBRepository.php.
References $q, $res, and buildProgressByRow().
Referenced by read().
|
protected |
Definition at line 389 of file class.ilPRGAssignmentDBRepository.php.
Referenced by count(), and read().
|
protected |
Definition at line 449 of file class.ilPRGAssignmentDBRepository.php.
References $res, assignmentByRow(), null, prebuildProgressesForAssingment(), and query().
Referenced by get(), getAboutToExpire(), getAllForNodeIsContained(), getAllForSpecificNode(), getExpiredAndNotInvalidated(), getForUser(), getForUserOnNode(), getPassedDeadline(), and getRiskyToFail().
ilPRGAssignmentDBRepository::resetExpiryInfoSentFor | ( | ilPRGAssignment | $ass | ) |
Definition at line 760 of file class.ilPRGAssignmentDBRepository.php.
References ilPRGAssignment\getId(), ilPRGAssignment\getRootId(), and null.
ilPRGAssignmentDBRepository::resetRiskyToFailSentFor | ( | ilPRGAssignment | $ass | ) |
Definition at line 789 of file class.ilPRGAssignmentDBRepository.php.
References ilPRGAssignment\getId(), ilPRGAssignment\getRootId(), and null.
ilPRGAssignmentDBRepository::store | ( | ilPRGAssignment | $assignment | ) |
Implements PRGAssignmentRepository.
Definition at line 121 of file class.ilPRGAssignmentDBRepository.php.
References ilPRGAssignment\DATE_TIME_FORMAT, ilPRGAssignment\getId(), ilPRGAssignment\getLastChange(), ilPRGAssignment\getLastChangeBy(), ilPRGAssignment\getProgresses(), ilPRGAssignment\getRestartDate(), ilPRGAssignment\getRestartedAssignmentId(), ilPRGAssignment\getRootId(), ilPRGAssignment\getUserId(), ilPRGAssignment\isManuallyAssigned(), null, storeProgressRow(), and updateAssignmentRowDB().
Referenced by ilObjStudyProgramme\removeMemberFromProgrammes().
ilPRGAssignmentDBRepository::storeExpiryInfoSentFor | ( | ilPRGAssignment | $ass | ) |
Definition at line 744 of file class.ilPRGAssignmentDBRepository.php.
References ilPRGAssignment\getId(), and ilPRGAssignment\getRootId().
|
protected |
Definition at line 675 of file class.ilPRGAssignmentDBRepository.php.
References $q, ilPRGProgress\DATE_FORMAT, ilPRGProgress\DATE_TIME_FORMAT, ilPRGProgress\getAmountOfPoints(), ilPRGProgress\getAssignmentDate(), ilPRGProgress\getCompletionBy(), ilPRGProgress\getCompletionDate(), ilPRGProgress\getCurrentAmountOfPoints(), ilPRGProgress\getDeadline(), ilPRGProgress\getLastChange(), ilPRGProgress\getLastChangeBy(), ilPRGProgress\getNodeId(), ilPRGProgress\getStatus(), ilPRGProgress\getValidityOfQualification(), ilPRGProgress\hasIndividualModifications(), and ilPRGProgress\isInvalidated().
Referenced by store().
ilPRGAssignmentDBRepository::storeRiskyToFailSentFor | ( | ilPRGAssignment | $ass | ) |
Definition at line 773 of file class.ilPRGAssignmentDBRepository.php.
References ilPRGAssignment\getId(), and ilPRGAssignment\getRootId().
|
protected |
Definition at line 660 of file class.ilPRGAssignmentDBRepository.php.
References $q.
Referenced by store().
|
protected |
<id => ilPRGProgress>
Definition at line 64 of file class.ilPRGAssignmentDBRepository.php.
|
protected |
Definition at line 59 of file class.ilPRGAssignmentDBRepository.php.
const ilPRGAssignmentDBRepository::ASSIGNMENT_FIELD_ID = 'id' |
Definition at line 28 of file class.ilPRGAssignmentDBRepository.php.
const ilPRGAssignmentDBRepository::ASSIGNMENT_FIELD_LAST_CHANGE = 'last_change' |
Definition at line 31 of file class.ilPRGAssignmentDBRepository.php.
const ilPRGAssignmentDBRepository::ASSIGNMENT_FIELD_LAST_CHANGE_BY = 'last_change_by' |
Definition at line 32 of file class.ilPRGAssignmentDBRepository.php.
const ilPRGAssignmentDBRepository::ASSIGNMENT_FIELD_MANUALLY_ASSIGNED = 'assigned_manually' |
Definition at line 36 of file class.ilPRGAssignmentDBRepository.php.
const ilPRGAssignmentDBRepository::ASSIGNMENT_FIELD_RESTART_DATE = 'restart_date' |
Definition at line 33 of file class.ilPRGAssignmentDBRepository.php.
const ilPRGAssignmentDBRepository::ASSIGNMENT_FIELD_RESTART_MAIL = 'restart_mail_send' |
Definition at line 35 of file class.ilPRGAssignmentDBRepository.php.
const ilPRGAssignmentDBRepository::ASSIGNMENT_FIELD_RESTARTED_ASSIGNMENT_ID = 'restarted_assignment_id' |
Definition at line 34 of file class.ilPRGAssignmentDBRepository.php.
const ilPRGAssignmentDBRepository::ASSIGNMENT_FIELD_ROOT_PRG_ID = 'root_prg_id' |
Definition at line 30 of file class.ilPRGAssignmentDBRepository.php.
const ilPRGAssignmentDBRepository::ASSIGNMENT_FIELD_USR_ID = 'usr_id' |
Definition at line 29 of file class.ilPRGAssignmentDBRepository.php.
const ilPRGAssignmentDBRepository::ASSIGNMENT_TABLE = 'prg_usr_assignments' |
Definition at line 27 of file class.ilPRGAssignmentDBRepository.php.
const ilPRGAssignmentDBRepository::DATE_FORMAT_ENDOFDAY = 'Y-m-d 23:59:59' |
Definition at line 57 of file class.ilPRGAssignmentDBRepository.php.
const ilPRGAssignmentDBRepository::PROGRESS_FIELD_ASSIGNMENT_DATE = 'assignment_date' |
Definition at line 46 of file class.ilPRGAssignmentDBRepository.php.
const ilPRGAssignmentDBRepository::PROGRESS_FIELD_ASSIGNMENT_ID = 'assignment_id' |
Definition at line 39 of file class.ilPRGAssignmentDBRepository.php.
const ilPRGAssignmentDBRepository::PROGRESS_FIELD_COMPLETION_BY = 'completion_by' |
Definition at line 45 of file class.ilPRGAssignmentDBRepository.php.
const ilPRGAssignmentDBRepository::PROGRESS_FIELD_COMPLETION_DATE = 'completion_date' |
Definition at line 49 of file class.ilPRGAssignmentDBRepository.php.
const ilPRGAssignmentDBRepository::PROGRESS_FIELD_DEADLINE = 'deadline' |
Definition at line 50 of file class.ilPRGAssignmentDBRepository.php.
Referenced by ilPRGAssignmentFilter\getItemConfig().
const ilPRGAssignmentDBRepository::PROGRESS_FIELD_INVALIDATED = 'invalidated' |
Definition at line 52 of file class.ilPRGAssignmentDBRepository.php.
Referenced by ilPRGAssignmentFilter\getItemConfig(), and ilPRGAssignmentFilter\toConditions().
const ilPRGAssignmentDBRepository::PROGRESS_FIELD_IS_INDIVIDUAL = 'individual' |
Definition at line 55 of file class.ilPRGAssignmentDBRepository.php.
const ilPRGAssignmentDBRepository::PROGRESS_FIELD_LAST_CHANGE = 'last_change' |
Definition at line 47 of file class.ilPRGAssignmentDBRepository.php.
const ilPRGAssignmentDBRepository::PROGRESS_FIELD_LAST_CHANGE_BY = 'last_change_by' |
Definition at line 48 of file class.ilPRGAssignmentDBRepository.php.
const ilPRGAssignmentDBRepository::PROGRESS_FIELD_MAIL_SENT_RISKYTOFAIL = 'sent_mail_risky_to_fail' |
Definition at line 53 of file class.ilPRGAssignmentDBRepository.php.
const ilPRGAssignmentDBRepository::PROGRESS_FIELD_MAIL_SENT_WILLEXPIRE = 'sent_mail_expires' |
Definition at line 54 of file class.ilPRGAssignmentDBRepository.php.
const ilPRGAssignmentDBRepository::PROGRESS_FIELD_POINTS = 'points' |
Definition at line 42 of file class.ilPRGAssignmentDBRepository.php.
const ilPRGAssignmentDBRepository::PROGRESS_FIELD_POINTS_CUR = 'points_cur' |
Definition at line 43 of file class.ilPRGAssignmentDBRepository.php.
const ilPRGAssignmentDBRepository::PROGRESS_FIELD_PRG_ID = 'prg_id' |
Definition at line 41 of file class.ilPRGAssignmentDBRepository.php.
const ilPRGAssignmentDBRepository::PROGRESS_FIELD_STATUS = 'status' |
Definition at line 44 of file class.ilPRGAssignmentDBRepository.php.
Referenced by ilPRGAssignmentFilter\getItemConfig(), and ilPRGAssignmentFilter\toConditions().
const ilPRGAssignmentDBRepository::PROGRESS_FIELD_USR_ID = 'usr_id' |
Definition at line 40 of file class.ilPRGAssignmentDBRepository.php.
const ilPRGAssignmentDBRepository::PROGRESS_FIELD_VQ_DATE = 'vq_date' |
Definition at line 51 of file class.ilPRGAssignmentDBRepository.php.
Referenced by ilPRGAssignmentFilter\getItemConfig().
const ilPRGAssignmentDBRepository::PROGRESS_TABLE = 'prg_usr_progress' |
Definition at line 38 of file class.ilPRGAssignmentDBRepository.php.