ILIAS
release_6 Revision v6.24-5-g0c8bfefb3b8
|
Represents the progress of a user at one node of a study programme. More...
Public Member Functions | |
__construct (ilStudyProgrammeProgress $progress, ilStudyProgrammeProgressRepository $progress_repository, ilStudyProgrammeAssignmentRepository $assignment_repository, ilStudyProgrammeEvents $events) | |
getStudyProgramme () | |
Get the program node this progress belongs to. More... | |
getAssignmentId () | |
Get the assignment this progress belongs to. More... | |
getId () | |
Get the id of the progress. More... | |
getNodeId () | |
Get the id of the program node the progress belongs to. More... | |
getUserId () | |
Get the id of the user who is assigned. More... | |
getStatus () | |
Get the status of the progress. More... | |
getAmountOfPoints () | |
Get the amount of points needed to complete the node. More... | |
getCurrentAmountOfPoints () | |
Get the amount of points the user currently achieved. More... | |
getLastChange () | |
Get the timestamp when the last change was made on this progress. More... | |
getLastChangeBy () | |
Get the id of the user who did the last change on this progress. More... | |
getCompletionBy () | |
Get the id of the user or course that lead to completion of this node. More... | |
getAssignmentDate () | |
Get the assignment date of this node. More... | |
getCompletionDate () | |
Get the completion date of this node. More... | |
getDeadline () | |
Get the deadline of this node. More... | |
setDeadline (DateTime $deadline=null) | |
Set the deadline of this node. More... | |
getValidityOfQualification () | |
Get validity of qualification. More... | |
setValidityOfQualification (DateTime $date=null) | |
Set validity of qualification. More... | |
storeProgress () | |
delete () | |
Delete the assignment from database. More... | |
markAccredited (int $user_id) | |
Mark this progress as accredited. More... | |
unmarkAccredited () | |
Set the node to in progress. More... | |
markFailed (int $a_user_id) | |
Mark this progress as failed. More... | |
invalidate () | |
Mark this progress as failed. More... | |
isInvalidated () | |
isSuccessfulExpired () | |
Check, whether a the course is passed and expired due to limited validity. More... | |
markNotFailed (int $user_id) | |
Set the node to in progress. More... | |
markNotRelevant (int $user_id) | |
Set the node to be not relevant for the user. More... | |
markRelevant (int $user_id) | |
Set the node to be relevant for the user. More... | |
setRequiredAmountOfPoints (int $a_points, int $user_id) | |
Set the amount of points the user is required to have to complete this node. More... | |
getMaximumPossibleAmountOfPoints (bool $only_relevant=false) | |
Get the maximum possible amount of points a user can achieve for the completion of this node. More... | |
canBeCompleted () | |
Check whether the user can achieve enough points on the subnodes to be able to complete this node. More... | |
hasIndividualModifications () | |
Check whether there are individual modifications for the user on this program. More... | |
isSuccessful () | |
Check whether the user was successful on this node. More... | |
isFailed () | |
Check whether user as failed on this node. More... | |
recalculateFailedToDeadline () | |
Recalculates the status according to deadline. More... | |
isAccredited () | |
Check whether the user was accredited on this node. More... | |
isRelevant () | |
Check whether this node is relevant for the user. More... | |
updateFromProgramNode () | |
Update the progress from its program node. More... | |
setLPCompleted (int $obj_id, int $usr_id) | |
Set this node to be completed due to a completed learning progress. More... | |
getChildrenProgress () | |
Get the progresses on the child nodes of this node for the same assignment this progress belongs to. More... | |
getNamesOfCompletedOrAccreditedChildren () | |
Get a list with the names of the children of this node that a were completed or accredited for the given assignment. More... | |
updateProgress (int $user_id) | |
Updates current progress. More... | |
informUserForRiskToFail () | |
hasSuccessStatus () | |
Static Public Member Functions | |
static | getPossibleActions (int $node_id, int $root_prg_id, int $status) |
Get a list with possible actions on a progress record. More... | |
Data Fields | |
const | ACTION_MARK_ACCREDITED = "mark_accredited" |
const | ACTION_UNMARK_ACCREDITED = "unmark_accredited" |
const | ACTION_SHOW_INDIVIDUAL_PLAN = "show_individual_plan" |
const | ACTION_REMOVE_USER = "remove_user" |
const | ACTION_CHANGE_EXPIRE_DATE = "change_expire_date" |
const | ACTION_CHANGE_DEADLINE = "change_deadline" |
Protected Member Functions | |
updateStatus () | |
Updates the status of this progress based on the status of the progress on the sub nodes. More... | |
hasSuccessfullChildren () | |
updateParentStatus () | |
Update the status of the parent of this node. More... | |
maybeLimitProgressValidity (ilObjStudyProgramme $prg, ilStudyProgrammeAssignment $assignment) | |
getParentProgresses () | |
Get the progress on the parent node for the same assignment this progress belongs to. More... | |
refreshLPStatus () | |
Protected Attributes | |
$progress | |
$progress_repository | |
$assignment_repository | |
$events | |
Represents the progress of a user at one node of a study programme.
A user could have multiple progress' on one node, since he could also have multiple assignments to one node.
Definition at line 14 of file class.ilStudyProgrammeUserProgress.php.
ilStudyProgrammeUserProgress::__construct | ( | ilStudyProgrammeProgress | $progress, |
ilStudyProgrammeProgressRepository | $progress_repository, | ||
ilStudyProgrammeAssignmentRepository | $assignment_repository, | ||
ilStudyProgrammeEvents | $events | ||
) |
Definition at line 43 of file class.ilStudyProgrammeUserProgress.php.
References $assignment_repository, $events, $progress, and $progress_repository.
ilStudyProgrammeUserProgress::canBeCompleted | ( | ) |
Check whether the user can achieve enough points on the subnodes to be able to complete this node.
ilException |
Definition at line 519 of file class.ilStudyProgrammeUserProgress.php.
References ilStudyProgrammeSettings\MODE_LP_COMPLETED.
Referenced by ilStudyProgrammeIndividualPlanProgressListGUI\buildProgressStatus().
ilStudyProgrammeUserProgress::delete | ( | ) |
Delete the assignment from database.
Definition at line 224 of file class.ilStudyProgrammeUserProgress.php.
ilStudyProgrammeUserProgress::getAmountOfPoints | ( | ) |
Get the amount of points needed to complete the node.
This is the amount of points yielded for the completion of the node above as well.
Definition at line 122 of file class.ilStudyProgrammeUserProgress.php.
Referenced by ilStudyProgrammeProgressListGUI\buildProgressBar(), ilStudyProgrammeProgressListGUI\buildProgressStatus(), ilStudyProgrammeProgressListGUI\buildToolTip(), and getCurrentAmountOfPoints().
ilStudyProgrammeUserProgress::getAssignmentDate | ( | ) |
Get the assignment date of this node.
Definition at line 169 of file class.ilStudyProgrammeUserProgress.php.
ilStudyProgrammeUserProgress::getAssignmentId | ( | ) |
Get the assignment this progress belongs to.
Definition at line 81 of file class.ilStudyProgrammeUserProgress.php.
Referenced by markAccredited(), ilStudyProgrammeEvents\userRiskyToFail(), and ilStudyProgrammeEvents\userSuccessful().
ilStudyProgrammeUserProgress::getChildrenProgress | ( | ) |
Get the progresses on the child nodes of this node for the same assignment this progress belongs to.
ilException |
Definition at line 859 of file class.ilStudyProgrammeUserProgress.php.
References ilObjStudyProgramme\getChildren(), ilObjStudyProgramme\getLPMode(), and ilStudyProgrammeSettings\MODE_LP_COMPLETED.
ilStudyProgrammeUserProgress::getCompletionBy | ( | ) |
Get the id of the user or course that lead to completion of this node.
Definition at line 161 of file class.ilStudyProgrammeUserProgress.php.
ilStudyProgrammeUserProgress::getCompletionDate | ( | ) |
Get the completion date of this node.
Definition at line 177 of file class.ilStudyProgrammeUserProgress.php.
ilStudyProgrammeUserProgress::getCurrentAmountOfPoints | ( | ) |
Get the amount of points the user currently achieved.
Definition at line 130 of file class.ilStudyProgrammeUserProgress.php.
References getAmountOfPoints(), getStudyProgramme(), isAccredited(), and isSuccessful().
Referenced by ilStudyProgrammeProgressListGUI\buildProgressBar(), ilStudyProgrammeProgressListGUI\buildProgressStatus(), and ilStudyProgrammeProgressListGUI\buildToolTip().
ilStudyProgrammeUserProgress::getDeadline | ( | ) |
Get the deadline of this node.
Definition at line 185 of file class.ilStudyProgrammeUserProgress.php.
ilStudyProgrammeUserProgress::getId | ( | ) |
Get the id of the progress.
Definition at line 89 of file class.ilStudyProgrammeUserProgress.php.
Referenced by ilStudyProgrammeProgressListGUI\buildProgressBar(), ilStudyProgrammeProgressListGUI\getTitleAndIconTarget(), ilObjStudyProgrammeIndividualPlanGUI\updateDeadline(), and ilStudyProgrammeEvents\userRiskyToFail().
ilStudyProgrammeUserProgress::getLastChange | ( | ) |
Get the timestamp when the last change was made on this progress.
Definition at line 145 of file class.ilStudyProgrammeUserProgress.php.
ilStudyProgrammeUserProgress::getLastChangeBy | ( | ) |
Get the id of the user who did the last change on this progress.
Definition at line 153 of file class.ilStudyProgrammeUserProgress.php.
ilStudyProgrammeUserProgress::getMaximumPossibleAmountOfPoints | ( | bool | $only_relevant = false | ) |
Get the maximum possible amount of points a user can achieve for the completion of this node.
If the program node runs in LP-mode this will be equal getAmountOfPoints.
TODO: Maybe caching this value would be a good idea.
ilException |
Definition at line 486 of file class.ilStudyProgrammeUserProgress.php.
References Vendor\Package\$a, Vendor\Package\$b, and ilStudyProgrammeSettings\MODE_LP_COMPLETED.
Referenced by ilStudyProgrammeProgressListGUI\buildProgressBar(), and ilStudyProgrammeProgressListGUI\buildProgressStatus().
ilStudyProgrammeUserProgress::getNamesOfCompletedOrAccreditedChildren | ( | ) |
Get a list with the names of the children of this node that a were completed or accredited for the given assignment.
ilException |
Definition at line 885 of file class.ilStudyProgrammeUserProgress.php.
References ilObjStudyProgramme\getChildren().
ilStudyProgrammeUserProgress::getNodeId | ( | ) |
Get the id of the program node the progress belongs to.
Definition at line 97 of file class.ilStudyProgrammeUserProgress.php.
|
protected |
Get the progress on the parent node for the same assignment this progress belongs to.
ilException |
Definition at line 826 of file class.ilStudyProgrammeUserProgress.php.
References ilObjStudyProgramme\getParent(), and ilObjStudyProgramme\getReferencesToSelf().
|
static |
Get a list with possible actions on a progress record.
Definition at line 908 of file class.ilStudyProgrammeUserProgress.php.
Referenced by ilStudyProgrammeUserProgressTest\testPossibleActions().
ilStudyProgrammeUserProgress::getStatus | ( | ) |
Get the status of the progress.
Definition at line 113 of file class.ilStudyProgrammeUserProgress.php.
Referenced by invalidate(), markAccredited(), and markFailed().
ilStudyProgrammeUserProgress::getStudyProgramme | ( | ) |
Get the program node this progress belongs to.
Throws when the according program has no ref id.
TODO: I'm quite sure, this will profit from caching.
ilException |
Definition at line 64 of file class.ilStudyProgrammeUserProgress.php.
References ilObject\_getAllReferences(), and ilObjStudyProgramme\getInstanceByRefId().
Referenced by ilStudyProgrammeProgressListGUI\buildProgressStatus(), getCurrentAmountOfPoints(), markAccredited(), ilStudyProgrammeExpandableProgressListGUI\shouldShowSubProgress(), and ilStudyProgrammeEvents\userSuccessful().
ilStudyProgrammeUserProgress::getUserId | ( | ) |
Get the id of the user who is assigned.
Definition at line 105 of file class.ilStudyProgrammeUserProgress.php.
ilStudyProgrammeUserProgress::getValidityOfQualification | ( | ) |
Get validity of qualification.
Definition at line 203 of file class.ilStudyProgrammeUserProgress.php.
Referenced by isSuccessfulExpired().
ilStudyProgrammeUserProgress::hasIndividualModifications | ( | ) |
Check whether there are individual modifications for the user on this program.
Definition at line 545 of file class.ilStudyProgrammeUserProgress.php.
|
protected |
ilException |
Definition at line 710 of file class.ilStudyProgrammeUserProgress.php.
ilStudyProgrammeUserProgress::hasSuccessStatus | ( | ) |
Definition at line 1010 of file class.ilStudyProgrammeUserProgress.php.
References ilStudyProgrammeProgress\STATUS_ACCREDITED, and ilStudyProgrammeProgress\STATUS_COMPLETED.
ilStudyProgrammeUserProgress::informUserForRiskToFail | ( | ) |
Definition at line 952 of file class.ilStudyProgrammeUserProgress.php.
ilStudyProgrammeUserProgress::invalidate | ( | ) |
Mark this progress as failed.
Throws when status is not STATUS_COMPLETED, STATUS_ACCREDITED, STATUS_NOT_RELEVANT.
ilException |
Definition at line 333 of file class.ilStudyProgrammeUserProgress.php.
References getStatus(), isSuccessfulExpired(), refreshLPStatus(), ilStudyProgrammeProgress\STATUS_ACCREDITED, ilStudyProgrammeProgress\STATUS_COMPLETED, and ilStudyProgrammeProgress\STATUS_NOT_RELEVANT.
ilStudyProgrammeUserProgress::isAccredited | ( | ) |
Check whether the user was accredited on this node.
Definition at line 598 of file class.ilStudyProgrammeUserProgress.php.
References ilStudyProgrammeProgress\STATUS_ACCREDITED.
Referenced by getCurrentAmountOfPoints().
ilStudyProgrammeUserProgress::isFailed | ( | ) |
Check whether user as failed on this node.
Definition at line 567 of file class.ilStudyProgrammeUserProgress.php.
References ilStudyProgrammeProgress\STATUS_FAILED.
ilStudyProgrammeUserProgress::isInvalidated | ( | ) |
Definition at line 354 of file class.ilStudyProgrammeUserProgress.php.
ilStudyProgrammeUserProgress::isRelevant | ( | ) |
Check whether this node is relevant for the user.
Definition at line 606 of file class.ilStudyProgrammeUserProgress.php.
References ilStudyProgrammeProgress\STATUS_NOT_RELEVANT.
Referenced by ilStudyProgrammeExpandableProgressListGUI\shouldShowSubProgress().
ilStudyProgrammeUserProgress::isSuccessful | ( | ) |
Check whether the user was successful on this node.
This is the case, when the node was accredited or completed.
Definition at line 554 of file class.ilStudyProgrammeUserProgress.php.
References ilStudyProgrammeProgress\STATUS_ACCREDITED, and ilStudyProgrammeProgress\STATUS_COMPLETED.
Referenced by ilStudyProgrammeProgressListGUI\buildProgressBar(), ilStudyProgrammeIndividualPlanProgressListGUI\buildProgressStatus(), getCurrentAmountOfPoints(), and isSuccessfulExpired().
ilStudyProgrammeUserProgress::isSuccessfulExpired | ( | ) |
Check, whether a the course is passed and expired due to limited validity.
Definition at line 362 of file class.ilStudyProgrammeUserProgress.php.
References getValidityOfQualification(), and isSuccessful().
Referenced by invalidate().
ilStudyProgrammeUserProgress::markAccredited | ( | int | $user_id | ) |
Mark this progress as accredited.
Throws when status is not IN_PROGRESS. Throws when program node is outdated and current status is NOT_RELEVANT.
ilException |
Definition at line 238 of file class.ilStudyProgrammeUserProgress.php.
References $progress, getAssignmentId(), getStatus(), getStudyProgramme(), maybeLimitProgressValidity(), ilStudyProgrammeProgress\STATUS_ACCREDITED, ilStudyProgrammeProgress\STATUS_NOT_RELEVANT, ilStudyProgrammeSettings\STATUS_OUTDATED, and updateParentStatus().
ilStudyProgrammeUserProgress::markFailed | ( | int | $a_user_id | ) |
Mark this progress as failed.
Throws when status is not STATUS_COMPLETED, STATUS_ACCREDITED, STATUS_NOT_RELEVANT.
ilException |
Definition at line 303 of file class.ilStudyProgrammeUserProgress.php.
References getStatus(), refreshLPStatus(), ilStudyProgrammeProgress\STATUS_ACCREDITED, ilStudyProgrammeProgress\STATUS_COMPLETED, ilStudyProgrammeProgress\STATUS_FAILED, and ilStudyProgrammeProgress\STATUS_NOT_RELEVANT.
ilStudyProgrammeUserProgress::markNotFailed | ( | int | $user_id | ) |
Set the node to in progress.
Throws when status is not FAILED.
ilException |
Definition at line 388 of file class.ilStudyProgrammeUserProgress.php.
References refreshLPStatus(), ilStudyProgrammeProgress\STATUS_FAILED, and ilStudyProgrammeProgress\STATUS_IN_PROGRESS.
ilStudyProgrammeUserProgress::markNotRelevant | ( | int | $user_id | ) |
Set the node to be not relevant for the user.
Throws when status is COMPLETED.
ilException |
int | $user_id | The user who marks the node as not relevant. |
Definition at line 415 of file class.ilStudyProgrammeUserProgress.php.
References ilStudyProgrammeProgress\STATUS_NOT_RELEVANT, and updateStatus().
ilStudyProgrammeUserProgress::markRelevant | ( | int | $user_id | ) |
Set the node to be relevant for the user.
Throws when status is not NOT_RELEVANT.
ilException |
Definition at line 436 of file class.ilStudyProgrammeUserProgress.php.
References ilStudyProgrammeProgress\STATUS_IN_PROGRESS, ilStudyProgrammeProgress\STATUS_NOT_RELEVANT, and updateStatus().
|
protected |
Exception |
Definition at line 792 of file class.ilStudyProgrammeUserProgress.php.
Referenced by markAccredited().
ilStudyProgrammeUserProgress::recalculateFailedToDeadline | ( | ) |
Recalculates the status according to deadline.
ilException |
Definition at line 579 of file class.ilStudyProgrammeUserProgress.php.
References ilStudyProgrammeProgress\DATE_FORMAT, ilStudyProgrammeProgress\STATUS_FAILED, and ilStudyProgrammeProgress\STATUS_IN_PROGRESS.
|
protected |
Definition at line 929 of file class.ilStudyProgrammeUserProgress.php.
References ilLPStatusWrapper\_refreshStatus(), and ilLPStatusWrapper\_resetInfoCaches().
Referenced by invalidate(), markFailed(), markNotFailed(), and unmarkAccredited().
ilStudyProgrammeUserProgress::setDeadline | ( | DateTime | $deadline = null | ) |
Set the deadline of this node.
Definition at line 193 of file class.ilStudyProgrammeUserProgress.php.
References ilStudyProgrammeProgress\setDeadline().
Referenced by ilObjStudyProgrammeIndividualPlanGUI\updateDeadline().
ilStudyProgrammeUserProgress::setLPCompleted | ( | int | $obj_id, |
int | $usr_id | ||
) |
Set this node to be completed due to a completed learning progress.
Will only set the progress if this node is relevant and not successful.
Throws when this node is not in LP-Mode. Throws when object that was completed is no child of the node or user does not belong to this progress.
ilException |
Definition at line 742 of file class.ilStudyProgrammeUserProgress.php.
References ilStudyProgrammeSettings\MODE_LP_COMPLETED, and ilStudyProgrammeProgress\STATUS_COMPLETED.
ilStudyProgrammeUserProgress::setRequiredAmountOfPoints | ( | int | $a_points, |
int | $user_id | ||
) |
Set the amount of points the user is required to have to complete this node.
Throws when status is completed.
ilException |
Definition at line 461 of file class.ilStudyProgrammeUserProgress.php.
ilStudyProgrammeUserProgress::setValidityOfQualification | ( | DateTime | $date = null | ) |
Set validity of qualification.
Definition at line 211 of file class.ilStudyProgrammeUserProgress.php.
ilStudyProgrammeUserProgress::storeProgress | ( | ) |
Definition at line 216 of file class.ilStudyProgrammeUserProgress.php.
ilStudyProgrammeUserProgress::unmarkAccredited | ( | ) |
Set the node to in progress.
Throws when status is not ACCREDITED.
ilException |
Definition at line 277 of file class.ilStudyProgrammeUserProgress.php.
References refreshLPStatus(), ilStudyProgrammeProgress\STATUS_ACCREDITED, ilStudyProgrammeProgress\STATUS_IN_PROGRESS, and updateParentStatus().
ilStudyProgrammeUserProgress::updateFromProgramNode | ( | ) |
Update the progress from its program node.
Will only update when the node does not have individual modifications and is not completed. Return false, when update could not be performed and true otherwise.
ilException |
Definition at line 619 of file class.ilStudyProgrammeUserProgress.php.
References ilStudyProgrammeSettings\STATUS_ACTIVE, ilStudyProgrammeProgress\STATUS_COMPLETED, ilStudyProgrammeProgress\STATUS_IN_PROGRESS, and ilStudyProgrammeProgress\STATUS_NOT_RELEVANT.
|
protected |
Update the status of the parent of this node.
Definition at line 724 of file class.ilStudyProgrammeUserProgress.php.
Referenced by markAccredited(), and unmarkAccredited().
ilStudyProgrammeUserProgress::updateProgress | ( | int | $user_id | ) |
Updates current progress.
ilException |
Definition at line 945 of file class.ilStudyProgrammeUserProgress.php.
Referenced by ilObjStudyProgrammeIndividualPlanGUI\updateDeadline().
|
protected |
Updates the status of this progress based on the status of the progress on the sub nodes.
Then update the status of the parent.
ilException |
Definition at line 652 of file class.ilStudyProgrammeUserProgress.php.
References Vendor\Package\$a, Vendor\Package\$b, ilStudyProgrammeSettings\MODE_LP_COMPLETED, ilStudyProgrammeProgress\STATUS_ACCREDITED, ilStudyProgrammeProgress\STATUS_COMPLETED, ilStudyProgrammeProgress\STATUS_IN_PROGRESS, and ilStudyProgrammeProgress\STATUS_NOT_RELEVANT.
Referenced by markNotRelevant(), and markRelevant().
|
protected |
Definition at line 36 of file class.ilStudyProgrammeUserProgress.php.
Referenced by __construct().
|
protected |
Definition at line 41 of file class.ilStudyProgrammeUserProgress.php.
Referenced by __construct().
|
protected |
Definition at line 26 of file class.ilStudyProgrammeUserProgress.php.
Referenced by __construct(), and markAccredited().
|
protected |
Definition at line 31 of file class.ilStudyProgrammeUserProgress.php.
Referenced by __construct().
const ilStudyProgrammeUserProgress::ACTION_CHANGE_DEADLINE = "change_deadline" |
Definition at line 21 of file class.ilStudyProgrammeUserProgress.php.
const ilStudyProgrammeUserProgress::ACTION_CHANGE_EXPIRE_DATE = "change_expire_date" |
Definition at line 20 of file class.ilStudyProgrammeUserProgress.php.
const ilStudyProgrammeUserProgress::ACTION_MARK_ACCREDITED = "mark_accredited" |
Definition at line 16 of file class.ilStudyProgrammeUserProgress.php.
Referenced by ilObjStudyProgrammeMembersGUI\getLinkTargetForAction(), and ilStudyProgrammeUserProgressTest\testPossibleActions().
const ilStudyProgrammeUserProgress::ACTION_REMOVE_USER = "remove_user" |
Definition at line 19 of file class.ilStudyProgrammeUserProgress.php.
Referenced by ilObjStudyProgrammeMembersGUI\getLinkTargetForAction(), and ilStudyProgrammeUserProgressTest\testPossibleActions().
const ilStudyProgrammeUserProgress::ACTION_SHOW_INDIVIDUAL_PLAN = "show_individual_plan" |
Definition at line 18 of file class.ilStudyProgrammeUserProgress.php.
Referenced by ilObjStudyProgrammeMembersGUI\getLinkTargetForAction(), and ilStudyProgrammeUserProgressTest\testPossibleActions().
const ilStudyProgrammeUserProgress::ACTION_UNMARK_ACCREDITED = "unmark_accredited" |
Definition at line 17 of file class.ilStudyProgrammeUserProgress.php.
Referenced by ilObjStudyProgrammeMembersGUI\getLinkTargetForAction(), and ilStudyProgrammeUserProgressTest\testPossibleActions().