ILIAS
release_5-3 Revision v5.3.23-19-g915713cf615
|
Represents the progress of a user at one node of a study programme. More...
Public Member Functions | |
__construct ($a_ids_or_model) | |
Throws when id does not refer to a study programme progress. More... | |
getStudyProgramme () | |
Get the program node where this progress belongs to was made. More... | |
getAssignment () | |
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... | |
getDeadline () | |
Get the deadline of this node. More... | |
setDeadline ($deadline) | |
Set the deadline of this node. More... | |
delete () | |
Delete the assignment from database. More... | |
markAccredited ($a_user_id) | |
Mark this progress as accredited. More... | |
unmarkAccredited () | |
Set the node to in progress. More... | |
markFailed ($a_user_id) | |
Mark this progress as failed. More... | |
markNotFailed () | |
Set the node to in progress. More... | |
markNotRelevant ($a_user_id) | |
Set the node to be not relevant for the user. More... | |
markRelevant ($a_user_id) | |
Set the node to be relevant for the user. More... | |
setRequiredAmountOfPoints ($a_points, $a_user_id) | |
Set the amount of points the user is required to have to complete this node. More... | |
getMaximumPossibleAmountOfPoints ($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 wether 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 ($a_obj_id, $a_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 ($user_id) | |
Updates current progress. More... | |
Static Public Member Functions | |
static | getPossibleActions ($a_node_id, $a_root_prg_id, $a_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" |
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... | |
getParentProgress () | |
Get the progress on the parent node for the same assignment this progress belongs to. More... | |
refreshLPStatus () | |
Protected Attributes | |
$progress | |
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 15 of file class.ilStudyProgrammeUserProgress.php.
ilStudyProgrammeUserProgress::__construct | ( | $a_ids_or_model | ) |
Throws when id does not refer to a study programme progress.
Expects an array [assignment_id, program_node_id, user_id] or an ilStudyProgress as first parameter.
ilException |
int[] | | ilStudyProgrammeAssignment $a_ids_or_model |
Definition at line 28 of file class.ilStudyProgrammeUserProgress.php.
References array, and ActiveRecord\where().
ilStudyProgrammeUserProgress::canBeCompleted | ( | ) |
Check whether the user can achieve enough points on the subnodes to be able to complete this node.
Definition at line 426 of file class.ilStudyProgrammeUserProgress.php.
References $progress, getAmountOfPoints(), getChildrenProgress(), getMaximumPossibleAmountOfPoints(), getStudyProgramme(), and ilStudyProgramme\MODE_LP_COMPLETED.
Referenced by ilStudyProgrammeIndividualPlanProgressListGUI\buildProgressStatus().
ilStudyProgrammeUserProgress::delete | ( | ) |
Delete the assignment from database.
Definition at line 204 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 132 of file class.ilStudyProgrammeUserProgress.php.
Referenced by ilStudyProgrammeProgressListGUI\buildProgressBar(), ilStudyProgrammeProgressListGUI\buildProgressStatus(), ilStudyProgrammeProgressListGUI\buildToolTip(), canBeCompleted(), getCurrentAmountOfPoints(), getMaximumPossibleAmountOfPoints(), and updateStatus().
ilStudyProgrammeUserProgress::getAssignment | ( | ) |
Get the assignment this progress belongs to.
Definition at line 80 of file class.ilStudyProgrammeUserProgress.php.
References ilStudyProgrammeUserAssignment\getInstance().
Referenced by getParentProgress(), and ilStudyProgrammeEvents\userSuccessful().
ilStudyProgrammeUserProgress::getChildrenProgress | ( | ) |
Get the progresses on the child nodes of this node for the same assignment this progress belongs to.
Definition at line 684 of file class.ilStudyProgrammeUserProgress.php.
References getStudyProgramme(), and ilStudyProgramme\MODE_LP_COMPLETED.
Referenced by canBeCompleted(), hasSuccessfullChildren(), and updateStatus().
ilStudyProgrammeUserProgress::getCompletionBy | ( | ) |
Get the id of the user or course that lead to completion of this node.
Definition at line 176 of file class.ilStudyProgrammeUserProgress.php.
ilStudyProgrammeUserProgress::getCurrentAmountOfPoints | ( | ) |
Get the amount of points the user currently achieved.
Definition at line 142 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 186 of file class.ilStudyProgrammeUserProgress.php.
Referenced by recalculateFailedToDeadline().
ilStudyProgrammeUserProgress::getId | ( | ) |
Get the id of the progress.
Definition at line 91 of file class.ilStudyProgrammeUserProgress.php.
Referenced by ilStudyProgrammeProgressListGUI\buildProgressBar(), getParentProgress(), ilStudyProgrammeProgressListGUI\getTitleAndIconTarget(), refreshLPStatus(), and ilObjStudyProgrammeIndividualPlanGUI\updateDeadline().
ilStudyProgrammeUserProgress::getLastChange | ( | ) |
Get the timestamp when the last change was made on this progress.
Definition at line 156 of file class.ilStudyProgrammeUserProgress.php.
ilStudyProgrammeUserProgress::getLastChangeBy | ( | ) |
Get the id of the user who did the last change on this progress.
Definition at line 166 of file class.ilStudyProgrammeUserProgress.php.
Referenced by hasIndividualModifications().
ilStudyProgrammeUserProgress::getMaximumPossibleAmountOfPoints | ( | $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.
$only_relevant | boolean true if check is nesserary the progress is relevant |
Definition at line 394 of file class.ilStudyProgrammeUserProgress.php.
References getAmountOfPoints(), getStudyProgramme(), and ilStudyProgramme\MODE_LP_COMPLETED.
Referenced by ilStudyProgrammeProgressListGUI\buildProgressBar(), ilStudyProgrammeProgressListGUI\buildProgressStatus(), and canBeCompleted().
ilStudyProgrammeUserProgress::getNamesOfCompletedOrAccreditedChildren | ( | ) |
Get a list with the names of the children of this node that a were completed or accredited for the given assignment.
int | $a_assignment_id |
Definition at line 707 of file class.ilStudyProgrammeUserProgress.php.
References $names, array, and getStudyProgramme().
ilStudyProgrammeUserProgress::getNodeId | ( | ) |
Get the id of the program node the progress belongs to.
Definition at line 101 of file class.ilStudyProgrammeUserProgress.php.
|
protected |
Get the progress on the parent node for the same assignment this progress belongs to.
Definition at line 663 of file class.ilStudyProgrammeUserProgress.php.
References getAssignment(), getId(), and getStudyProgramme().
Referenced by updateParentStatus().
|
static |
Get a list with possible actions on a progress record.
int | $a_node_id | object_id! |
int | $a_belongs | object_id! |
int | $a_status |
Definition at line 734 of file class.ilStudyProgrammeUserProgress.php.
References array, ilStudyProgrammeProgress\STATUS_ACCREDITED, and ilStudyProgrammeProgress\STATUS_IN_PROGRESS.
Referenced by ilStudyProgrammeMembersTableGUI\fetchData(), and ilStudyProgrammeUserProgressTest\testPossibleActions().
ilStudyProgrammeUserProgress::getStatus | ( | ) |
Get the status of the progress.
Definition at line 121 of file class.ilStudyProgrammeUserProgress.php.
Referenced by isAccredited(), isFailed(), isRelevant(), isSuccessful(), markAccredited(), markFailed(), updateFromProgramNode(), and updateStatus().
ilStudyProgrammeUserProgress::getStudyProgramme | ( | ) |
Get the program node where this progress belongs to was made.
Throws when program this assignment is about has no ref id.
TODO: I'm quite sure, this will profit from caching.
ilException |
Definition at line 63 of file class.ilStudyProgrammeUserProgress.php.
References ilObject\_getAllReferences(), and ilObjStudyProgramme\getInstanceByRefId().
Referenced by ilStudyProgrammeProgressListGUI\buildProgressStatus(), canBeCompleted(), getChildrenProgress(), getCurrentAmountOfPoints(), getMaximumPossibleAmountOfPoints(), getNamesOfCompletedOrAccreditedChildren(), getParentProgress(), markAccredited(), refreshLPStatus(), setLPCompleted(), ilStudyProgrammeExpandableProgressListGUI\shouldShowSubProgress(), updateFromProgramNode(), updateStatus(), and ilStudyProgrammeEvents\userSuccessful().
ilStudyProgrammeUserProgress::getUserId | ( | ) |
Get the id of the user who is assigned.
Definition at line 111 of file class.ilStudyProgrammeUserProgress.php.
Referenced by refreshLPStatus(), and setLPCompleted().
ilStudyProgrammeUserProgress::hasIndividualModifications | ( | ) |
Check whether there are individual modifications for the user on this program.
Definition at line 453 of file class.ilStudyProgrammeUserProgress.php.
References getLastChangeBy().
Referenced by updateFromProgramNode().
|
protected |
Definition at line 596 of file class.ilStudyProgrammeUserProgress.php.
References getChildrenProgress().
Referenced by updateStatus().
ilStudyProgrammeUserProgress::isAccredited | ( | ) |
Check whether the user was accredited on this node.
Definition at line 505 of file class.ilStudyProgrammeUserProgress.php.
References getStatus(), and ilStudyProgrammeProgress\STATUS_ACCREDITED.
Referenced by getCurrentAmountOfPoints().
ilStudyProgrammeUserProgress::isFailed | ( | ) |
Check wether user as failed on this node.
Definition at line 477 of file class.ilStudyProgrammeUserProgress.php.
References getStatus(), and ilStudyProgrammeProgress\STATUS_FAILED.
ilStudyProgrammeUserProgress::isRelevant | ( | ) |
Check whether this node is relevant for the user.
Definition at line 517 of file class.ilStudyProgrammeUserProgress.php.
References getStatus(), and ilStudyProgrammeProgress\STATUS_NOT_RELEVANT.
Referenced by setLPCompleted(), and 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 464 of file class.ilStudyProgrammeUserProgress.php.
References getStatus(), ilStudyProgrammeProgress\STATUS_ACCREDITED, and ilStudyProgrammeProgress\STATUS_COMPLETED.
Referenced by ilStudyProgrammeProgressListGUI\buildProgressBar(), ilStudyProgrammeIndividualPlanProgressListGUI\buildProgressStatus(), getCurrentAmountOfPoints(), and setLPCompleted().
ilStudyProgrammeUserProgress::markAccredited | ( | $a_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 |
int | $a_user_id | The user who performed the operation. |
Definition at line 220 of file class.ilStudyProgrammeUserProgress.php.
References getStatus(), getStudyProgramme(), ilStudyProgrammeProgress\STATUS_ACCREDITED, ilStudyProgrammeProgress\STATUS_NOT_RELEVANT, ilStudyProgramme\STATUS_OUTDATED, updateParentStatus(), and ilStudyProgrammeEvents\userSuccessful().
ilStudyProgrammeUserProgress::markFailed | ( | $a_user_id | ) |
Mark this progress as failed.
Throws when status is not STATUS_COMPLETED, STATUS_ACCREDITED, STATUS_NOT_RELEVANT.
ilException |
int | $a_user_id | The user who performed the operation. |
Definition at line 274 of file class.ilStudyProgrammeUserProgress.php.
References array, getStatus(), refreshLPStatus(), ilStudyProgrammeProgress\STATUS_ACCREDITED, ilStudyProgrammeProgress\STATUS_COMPLETED, ilStudyProgrammeProgress\STATUS_FAILED, and ilStudyProgrammeProgress\STATUS_NOT_RELEVANT.
ilStudyProgrammeUserProgress::markNotFailed | ( | ) |
Set the node to in progress.
Throws when status is not FAILED.
ilException |
Definition at line 302 of file class.ilStudyProgrammeUserProgress.php.
References refreshLPStatus(), ilStudyProgrammeProgress\STATUS_FAILED, and ilStudyProgrammeProgress\STATUS_IN_PROGRESS.
ilStudyProgrammeUserProgress::markNotRelevant | ( | $a_user_id | ) |
Set the node to be not relevant for the user.
Throws when status is COMPLETED.
ilException |
int | $a_user_id | The user who marks the node as not relevant. |
Definition at line 327 of file class.ilStudyProgrammeUserProgress.php.
References ilStudyProgrammeProgress\STATUS_NOT_RELEVANT, and updateStatus().
ilStudyProgrammeUserProgress::markRelevant | ( | $a_user_id | ) |
Set the node to be relevant for the user.
Throws when status is not NOT_RELEVANT.
ilException |
int | $a_user_id | The user who marks the node as not relevant. |
Definition at line 347 of file class.ilStudyProgrammeUserProgress.php.
References ilStudyProgrammeProgress\STATUS_IN_PROGRESS, ilStudyProgrammeProgress\STATUS_NOT_RELEVANT, and updateStatus().
ilStudyProgrammeUserProgress::recalculateFailedToDeadline | ( | ) |
Recalculates the status according to deadline.
Definition at line 489 of file class.ilStudyProgrammeUserProgress.php.
References date, getDeadline(), IL_CAL_DATE, and ilStudyProgrammeProgress\STATUS_FAILED.
|
protected |
Definition at line 749 of file class.ilStudyProgrammeUserProgress.php.
References ilLPStatusWrapper\_refreshStatus(), array, getId(), getStudyProgramme(), and getUserId().
Referenced by markFailed(), markNotFailed(), setLPCompleted(), unmarkAccredited(), and updateStatus().
ilStudyProgrammeUserProgress::setDeadline | ( | $deadline | ) |
Set the deadline of this node.
ilDateTime | null | $deadline |
Definition at line 196 of file class.ilStudyProgrammeUserProgress.php.
Referenced by ilObjStudyProgrammeIndividualPlanGUI\updateDeadline().
ilStudyProgrammeUserProgress::setLPCompleted | ( | $a_obj_id, | |
$a_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 627 of file class.ilStudyProgrammeUserProgress.php.
References getStudyProgramme(), getUserId(), isRelevant(), isSuccessful(), ilStudyProgramme\MODE_LP_COMPLETED, refreshLPStatus(), ilStudyProgrammeProgress\STATUS_COMPLETED, updateParentStatus(), and ilStudyProgrammeEvents\userSuccessful().
ilStudyProgrammeUserProgress::setRequiredAmountOfPoints | ( | $a_points, | |
$a_user_id | |||
) |
Set the amount of points the user is required to have to complete this node.
Throws when status is completed.
ilException |
int | $a_points | The amount of points the user needs for completion. |
int | $a_user_id | The id of the user who did the modification. |
Definition at line 372 of file class.ilStudyProgrammeUserProgress.php.
References updateStatus().
ilStudyProgrammeUserProgress::unmarkAccredited | ( | ) |
Set the node to in progress.
Throws when status is not ACCREDITED.
ilException |
Definition at line 249 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.
Definition at line 529 of file class.ilStudyProgrammeUserProgress.php.
References getStatus(), getStudyProgramme(), hasIndividualModifications(), ilStudyProgramme\STATUS_ACTIVE, ilStudyProgrammeProgress\STATUS_COMPLETED, ilStudyProgrammeProgress\STATUS_IN_PROGRESS, ilStudyProgrammeProgress\STATUS_NOT_RELEVANT, League\Flysystem\Adapter\Polyfill\update(), and updateStatus().
|
protected |
Update the status of the parent of this node.
Definition at line 609 of file class.ilStudyProgrammeUserProgress.php.
References getParentProgress().
Referenced by markAccredited(), setLPCompleted(), unmarkAccredited(), and updateStatus().
ilStudyProgrammeUserProgress::updateProgress | ( | $user_id | ) |
Updates current progress.
int | $user_id |
Definition at line 762 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.
Definition at line 554 of file class.ilStudyProgrammeUserProgress.php.
References getAmountOfPoints(), getChildrenProgress(), getStatus(), getStudyProgramme(), hasSuccessfullChildren(), ilStudyProgramme\MODE_LP_COMPLETED, refreshLPStatus(), ilStudyProgrammeProgress\STATUS_ACCREDITED, ilStudyProgrammeProgress\STATUS_COMPLETED, ilStudyProgrammeProgress\STATUS_IN_PROGRESS, ilStudyProgrammeProgress\STATUS_NOT_RELEVANT, updateParentStatus(), and ilStudyProgrammeEvents\userSuccessful().
Referenced by markNotRelevant(), markRelevant(), setRequiredAmountOfPoints(), and updateFromProgramNode().
|
protected |
Definition at line 17 of file class.ilStudyProgrammeUserProgress.php.
Referenced by canBeCompleted().
const ilStudyProgrammeUserProgress::ACTION_MARK_ACCREDITED = "mark_accredited" |
Definition at line 723 of file class.ilStudyProgrammeUserProgress.php.
Referenced by ilObjStudyProgrammeMembersGUI\getLinkTargetForAction(), and ilStudyProgrammeUserProgressTest\testPossibleActions().
const ilStudyProgrammeUserProgress::ACTION_REMOVE_USER = "remove_user" |
Definition at line 726 of file class.ilStudyProgrammeUserProgress.php.
Referenced by ilObjStudyProgrammeMembersGUI\getLinkTargetForAction(), and ilStudyProgrammeUserProgressTest\testPossibleActions().
const ilStudyProgrammeUserProgress::ACTION_SHOW_INDIVIDUAL_PLAN = "show_individual_plan" |
Definition at line 725 of file class.ilStudyProgrammeUserProgress.php.
Referenced by ilObjStudyProgrammeMembersGUI\getLinkTargetForAction(), and ilStudyProgrammeUserProgressTest\testPossibleActions().
const ilStudyProgrammeUserProgress::ACTION_UNMARK_ACCREDITED = "unmark_accredited" |
Definition at line 724 of file class.ilStudyProgrammeUserProgress.php.
Referenced by ilObjStudyProgrammeMembersGUI\getLinkTargetForAction(), and ilStudyProgrammeUserProgressTest\testPossibleActions().