ILIAS
release_5-3 Revision v5.3.23-19-g915713cf615
|
Class ilStudyProgrammeProgress. More...
Public Member Functions | |
getAssignmentId () | |
Get the assignment, this progress belongs to. More... | |
getNodeId () | |
Get the id of the program node this progress belongs to. More... | |
getUserId () | |
Get the id of the user this progress is for. More... | |
getAmountOfPoints () | |
Get the amount of points the user needs to achieve on the subnodes of this node. More... | |
setAmountOfPoints ($a_points) | |
Get the amount of points the user needs to achieve on the subnodes of this node. More... | |
getCurrentAmountOfPoints () | |
Get the amount of points the user currently has achieved on the node. More... | |
setCurrentAmountOfPoints ($a_points) | |
Set the amount of points the user currently has achieved on this node. More... | |
getStatus () | |
Get the status the user has on this node. More... | |
setStatus ($a_status) | |
Set the status of this node. More... | |
setCompletionBy ($a_id) | |
Set the completion_by field. More... | |
getCompletionBy () | |
Get the id of object or user that lead to the successful completion of this node. More... | |
getLastChangeBy () | |
Get the id of the user who did the last change on this assignment. More... | |
setLastChangeBy ($a_usr_id) | |
Set the id of the user who did the last change on this progress. More... | |
getLastChange () | |
Get the timestamp of the last change on this progress. More... | |
updateLastChange () | |
Update the last change timestamp to the current time. More... | |
setLastChange (ilDateTime $a_timestamp) | |
Set the last change timestamp to the given time. More... | |
getDeadline () | |
Get the deadline of this progress. More... | |
setDeadline (ilDateTime $deadline=null) | |
Set the deadline of this progress. More... | |
Public Member Functions inherited from ActiveRecord | |
getArConnector () | |
getArFieldList () | |
getConnectorContainerName () | |
setConnectorContainerName ($connector_container_name) | |
getPrimaryFieldValue () | |
setPrimaryFieldValue ($value) | |
__construct ($primary_key=0, arConnector $connector=null) | |
storeObjectToCache () | |
__getConvertedDateFieldsAsArray ($format=null) | |
__asCsv ($separator=';', $header=false) | |
__asArray () | |
__asStdClass () | |
__asSerializedObject () | |
buildFromArray (array $array) | |
fixDateField ($field_name, $value) | |
sleep ($field_name) | |
wakeUp ($field_name, $field_value) | |
getArrayForDb () | |
getArrayForConnector () | |
installConnector () | |
store () | |
save () | |
create () | |
copy ($new_id=0) | |
afterObjectLoad () | |
read () | |
update () | |
delete () | |
__call ($name, $arguments) | |
Static Public Member Functions | |
static | returnDbTableName () |
static | createFor (ilStudyProgramme $a_prg, ilStudyProgrammeAssignment $a_ass) |
Create a new progress object for a given program node and assignment. More... | |
Static Public Member Functions inherited from ActiveRecord | |
static | returnDbTableName () |
static | installDB () |
static | renameDBField ($old_name, $new_name) |
static | tableExists () |
static | fieldExists ($field_name) |
static | removeDBField ($field_name) |
static | updateDB () |
static | resetDB () |
static | truncateDB () |
static | flushDB () |
static | preloadObjects () |
static | additionalParams (array $additional_params) |
static | findOrFail ($primary_key, array $add_constructor_args=array()) |
Tries to find the object and throws an Exception if object is not found, instead of returning null. More... | |
static | findOrGetInstance ($primary_key, array $add_constructor_args=array()) |
static | where ($where, $operator=null) |
static | innerjoinAR (ActiveRecord $ar, $on_this, $on_external, $fields=array(' *'), $operator='=', $both_external=false) |
static | innerjoin ($tablename, $on_this, $on_external, $fields=array(' *'), $operator='=', $both_external=false) |
static | leftjoin ($tablename, $on_this, $on_external, $fields=array(' *'), $operator='=', $both_external=false) |
static | orderBy ($orderBy, $orderDirection='ASC') |
static | dateFormat ($date_format='d.m.Y - H:i:s') |
static | limit ($start, $end) |
static | affectedRows () |
static | count () |
static | get () |
static | debug () |
static | first () |
static | getCollection () |
static | last () |
static | getFirstFromLastQuery () |
static | connector (arConnector $connector) |
static | raw ($set_raw=true) |
static | getArray ($key=null, $values=null) |
static | _toCamelCase ($str, $capitalise_first_char=false) |
Data Fields | |
const | STATUS_IN_PROGRESS = 1 |
const | STATUS_COMPLETED = 2 |
const | STATUS_ACCREDITED = 3 |
const | STATUS_NOT_RELEVANT = 4 |
const | STATUS_FAILED = 5 |
Data Fields inherited from ActiveRecord | |
const | ACTIVE_RECORD_VERSION = '2.0.7' |
Static Public Attributes | |
static | $STATUS |
Protected Member Functions | |
setAssignmentId ($a_id) | |
setNodeId ($a_id) | |
setUserId ($a_id) | |
Protected Member Functions inherited from ActiveRecord | |
serializeToCSV ($field) | |
This method is called for every field of your instance if you use __asCsv. More... | |
installDatabase () | |
Protected Attributes | |
$id | |
$assignment_id | |
$prg_id | |
$usr_id | |
$points | |
$points_cur | |
$status | |
$completion_by | |
$last_change | |
$last_change_by | |
$deadline | |
Protected Attributes inherited from ActiveRecord | |
$ar_safe_read = true | |
$connector_container_name = '' | |
Additional Inherited Members | |
Static Protected Member Functions inherited from ActiveRecord | |
static | getCalledClass () |
static | fromCamelCase ($str) |
Class ilStudyProgrammeProgress.
Represents the progress of a user for one program assignment on one node of the program.
The user has one progress per assignment and program node in the subtree of the assigned program.
Definition at line 20 of file class.ilStudyProgrammeProgress.php.
|
static |
Create a new progress object for a given program node and assignment.
$a_assigning_user | int |
Definition at line 206 of file class.ilStudyProgrammeProgress.php.
References ilStudyProgrammeAssignment\getId(), ilStudyProgramme\getObjId(), ilStudyProgramme\getPoints(), ilStudyProgrammeAssignment\getUserId(), setCurrentAmountOfPoints(), setNodeId(), setStatus(), setUserId(), and STATUS_IN_PROGRESS.
Referenced by ilStudyProgrammeUserAssignment\addMissingProgresses(), and ilObjStudyProgramme\createProgressForAssignment().
ilStudyProgrammeProgress::getAmountOfPoints | ( | ) |
Get the amount of points the user needs to achieve on the subnodes of this node.
Also the amount of points, this node yields for the progress on the nodes above.
Definition at line 277 of file class.ilStudyProgrammeProgress.php.
References $points.
ilStudyProgrammeProgress::getAssignmentId | ( | ) |
Get the assignment, this progress belongs to.
Definition at line 227 of file class.ilStudyProgrammeProgress.php.
References $assignment_id.
ilStudyProgrammeProgress::getCompletionBy | ( | ) |
Get the id of object or user that lead to the successful completion of this node.
Definition at line 390 of file class.ilStudyProgrammeProgress.php.
References $completion_by.
ilStudyProgrammeProgress::getCurrentAmountOfPoints | ( | ) |
Get the amount of points the user currently has achieved on the node.
Definition at line 310 of file class.ilStudyProgrammeProgress.php.
References $points_cur.
ilStudyProgrammeProgress::getDeadline | ( | ) |
Get the deadline of this progress.
Definition at line 474 of file class.ilStudyProgrammeProgress.php.
References $deadline, and IL_CAL_DATE.
ilStudyProgrammeProgress::getLastChange | ( | ) |
Get the timestamp of the last change on this progress.
Definition at line 427 of file class.ilStudyProgrammeProgress.php.
References IL_CAL_DATETIME.
Referenced by setLastChange().
ilStudyProgrammeProgress::getLastChangeBy | ( | ) |
Get the id of the user who did the last change on this assignment.
Definition at line 399 of file class.ilStudyProgrammeProgress.php.
References $last_change_by.
ilStudyProgrammeProgress::getNodeId | ( | ) |
Get the id of the program node this progress belongs to.
Definition at line 243 of file class.ilStudyProgrammeProgress.php.
References $prg_id.
ilStudyProgrammeProgress::getStatus | ( | ) |
Get the status the user has on this node.
Definition at line 340 of file class.ilStudyProgrammeProgress.php.
References $status.
ilStudyProgrammeProgress::getUserId | ( | ) |
Get the id of the user this progress is for.
Definition at line 259 of file class.ilStudyProgrammeProgress.php.
References $usr_id.
|
static |
Definition at line 50 of file class.ilStudyProgrammeProgress.php.
Referenced by ilStudyProgrammeMembersTableGUI\getFrom().
ilStudyProgrammeProgress::setAmountOfPoints | ( | $a_points | ) |
Get the amount of points the user needs to achieve on the subnodes of this node.
Also the amount of points, this node yields for the progress on the nodes above.
Throws when amount of points is smaller then zero.
ilException |
Definition at line 292 of file class.ilStudyProgrammeProgress.php.
References updateLastChange().
|
protected |
Definition at line 232 of file class.ilStudyProgrammeProgress.php.
ilStudyProgrammeProgress::setCompletionBy | ( | $a_id | ) |
Set the completion_by field.
$a_id | int | null |
Definition at line 374 of file class.ilStudyProgrammeProgress.php.
References updateLastChange().
ilStudyProgrammeProgress::setCurrentAmountOfPoints | ( | $a_points | ) |
Set the amount of points the user currently has achieved on this node.
Throw when amount of points is smaller then zero.
ilException |
Definition at line 323 of file class.ilStudyProgrammeProgress.php.
References updateLastChange().
Referenced by createFor().
ilStudyProgrammeProgress::setDeadline | ( | ilDateTime | $deadline = null | ) |
Set the deadline of this progress.
ilDateTime | null | $deadline |
Definition at line 489 of file class.ilStudyProgrammeProgress.php.
References $deadline, and IL_CAL_DATE.
ilStudyProgrammeProgress::setLastChange | ( | ilDateTime | $a_timestamp | ) |
Set the last change timestamp to the given time.
Throws when given time is smaller then current timestamp since that is logically impossible.
ilException |
Definition at line 457 of file class.ilStudyProgrammeProgress.php.
References ilDateTime\_before(), ilDateTime\get(), getLastChange(), and IL_CAL_DATETIME.
Referenced by updateLastChange().
ilStudyProgrammeProgress::setLastChangeBy | ( | $a_usr_id | ) |
Set the id of the user who did the last change on this progress.
Throws when $a_usr_id is not the id of a user.
ilException |
Definition at line 412 of file class.ilStudyProgrammeProgress.php.
References ilObject\_lookupType().
|
protected |
Definition at line 248 of file class.ilStudyProgrammeProgress.php.
Referenced by createFor().
ilStudyProgrammeProgress::setStatus | ( | $a_status | ) |
Set the status of this node.
Throws when status is none of ilStudyProgramme::STATUS_*. Throws when current status is STATUS_COMPLETED.
ilException |
$a_status | int - one of ilStudyProgramme::STATUS_* |
Definition at line 355 of file class.ilStudyProgrammeProgress.php.
References updateLastChange().
Referenced by createFor().
|
protected |
Definition at line 264 of file class.ilStudyProgrammeProgress.php.
Referenced by createFor().
ilStudyProgrammeProgress::updateLastChange | ( | ) |
Update the last change timestamp to the current time.
TODO: I'm not quite sure how the semantics of the last change field should be. Should this record every change or only changes done by a user manually. The answer to this question will also tell whether this method should be called in other setters or not.
Definition at line 442 of file class.ilStudyProgrammeProgress.php.
References IL_CAL_DATETIME, ilUtil\now(), and setLastChange().
Referenced by setAmountOfPoints(), setCompletionBy(), setCurrentAmountOfPoints(), and setStatus().
|
protected |
Definition at line 85 of file class.ilStudyProgrammeProgress.php.
Referenced by getAssignmentId().
|
protected |
Definition at line 162 of file class.ilStudyProgrammeProgress.php.
Referenced by getCompletionBy().
|
protected |
Definition at line 198 of file class.ilStudyProgrammeProgress.php.
Referenced by getDeadline(), and setDeadline().
|
protected |
Definition at line 73 of file class.ilStudyProgrammeProgress.php.
|
protected |
Definition at line 175 of file class.ilStudyProgrammeProgress.php.
|
protected |
Definition at line 187 of file class.ilStudyProgrammeProgress.php.
Referenced by getLastChangeBy().
|
protected |
Definition at line 123 of file class.ilStudyProgrammeProgress.php.
Referenced by getAmountOfPoints().
|
protected |
Definition at line 135 of file class.ilStudyProgrammeProgress.php.
Referenced by getCurrentAmountOfPoints().
|
protected |
Definition at line 97 of file class.ilStudyProgrammeProgress.php.
Referenced by getNodeId().
|
static |
Definition at line 40 of file class.ilStudyProgrammeProgress.php.
|
protected |
Definition at line 147 of file class.ilStudyProgrammeProgress.php.
Referenced by getStatus().
|
protected |
Definition at line 110 of file class.ilStudyProgrammeProgress.php.
Referenced by getUserId().
const ilStudyProgrammeProgress::STATUS_ACCREDITED = 3 |
Definition at line 34 of file class.ilStudyProgrammeProgress.php.
Referenced by ilObjStudyProgrammeAccess\checkCondition(), ilStudyProgrammeMembersTableGUI\fetchData(), ilStudyProgrammeIndividualPlanTableGUI\getManualStatusSelect(), ilStudyProgrammeUserProgress\getPossibleActions(), ilStudyProgrammeUserProgress\isAccredited(), ilStudyProgrammeUserProgress\isSuccessful(), ilStudyProgrammeUserProgress\markAccredited(), ilStudyProgrammeUserProgress\markFailed(), ilObjStudyProgrammeMembersGUI\markRelevantMulti(), ilStudyProgrammeUserProgressDB\statusToRepr(), ilStudyProgrammeUserProgressTest\testMarkAccredited(), ilStudyProgrammeUserProgressTest\testPossibleActions(), ilStudyProgrammeProgressCalculationTest\testProgress2(), ilStudyProgrammeUserProgress\unmarkAccredited(), ilObjStudyProgrammeMembersGUI\unmarkAccreditedMulti(), ilObjStudyProgrammeIndividualPlanGUI\updateStatus(), and ilStudyProgrammeUserProgress\updateStatus().
const ilStudyProgrammeProgress::STATUS_COMPLETED = 2 |
Definition at line 31 of file class.ilStudyProgrammeProgress.php.
Referenced by ilObjStudyProgrammeAccess\checkCondition(), ilStudyProgrammeMembersTableGUI\fetchData(), ilStudyProgrammeIndividualPlanTableGUI\getManualStatusSelect(), ilStudyProgrammeUserProgress\isSuccessful(), ilStudyProgrammeUserProgress\markFailed(), ilStudyProgrammeUserProgress\setLPCompleted(), ilStudyProgrammeUserProgressDB\statusToRepr(), ilStudyProgrammeProgressCalculationTest\testInitialProgressOnOptionalNodes(), ilStudyProgrammeUserProgressTest\testMarkAccredited(), ilStudyProgrammeProgressCalculationTest\testProgress1(), ilStudyProgrammeProgressCalculationTest\testProgress2(), ilStudyProgrammeProgressCalculationTest\testProgress3(), ilStudyProgrammeProgressCalculationTest\testProgress4(), ilStudyProgrammeUserProgress\updateFromProgramNode(), and ilStudyProgrammeUserProgress\updateStatus().
const ilStudyProgrammeProgress::STATUS_FAILED = 5 |
Definition at line 38 of file class.ilStudyProgrammeProgress.php.
Referenced by ilStudyProgrammeUserProgress\isFailed(), ilStudyProgrammeUserProgress\markFailed(), ilStudyProgrammeUserProgress\markNotFailed(), ilStudyProgrammeUserProgress\recalculateFailedToDeadline(), ilStudyProgrammeUserProgressDB\statusToRepr(), ilStudyProgrammeUserProgressTest\testMarkFailed(), ilStudyProgrammeUserProgressTest\testMarkNotFailed(), and ilObjStudyProgrammeIndividualPlanGUI\updateStatus().
const ilStudyProgrammeProgress::STATUS_IN_PROGRESS = 1 |
Definition at line 28 of file class.ilStudyProgrammeProgress.php.
Referenced by createFor(), ilStudyProgrammeUserProgress\getPossibleActions(), ilStudyProgrammeIndividualPlanTableGUI\getRequiredPointsInput(), ilStudyProgrammeUserProgress\markNotFailed(), ilStudyProgrammeUserProgress\markRelevant(), ilObjStudyProgrammeMembersGUI\markRelevantMulti(), ilStudyProgrammeUserProgressDB\statusToRepr(), ilStudyProgrammeUserProgressTest\testInitialProgressActive(), ilStudyProgrammeUserProgressTest\testInitialProgressDraft(), ilStudyProgrammeProgressCalculationTest\testInitialProgressOnOptionalNodes(), ilStudyProgrammeUserProgressTest\testInitialProgressOutdated(), ilStudyProgrammeUserProgressTest\testMarkAccredited(), ilStudyProgrammeUserProgressTest\testMarkFailed(), ilStudyProgrammeUserProgressTest\testMarkNotFailed(), ilStudyProgrammeUserProgressTest\testMarkNotRelevant(), ilStudyProgrammeUserProgressTest\testPossibleActions(), ilStudyProgrammeProgressCalculationTest\testProgress4(), ilStudyProgrammeUserProgressTest\testUnmarkAccredited(), ilStudyProgrammeUserProgress\unmarkAccredited(), ilStudyProgrammeUserProgress\updateFromProgramNode(), ilObjStudyProgrammeIndividualPlanGUI\updateRequiredPoints(), ilObjStudyProgrammeIndividualPlanGUI\updateStatus(), and ilStudyProgrammeUserProgress\updateStatus().
const ilStudyProgrammeProgress::STATUS_NOT_RELEVANT = 4 |
Definition at line 36 of file class.ilStudyProgrammeProgress.php.
Referenced by ilStudyProgrammeUserAssignment\addMissingProgresses(), ilObjStudyProgramme\assignUser(), ilObjStudyProgramme\canBeRemoved(), ilStudyProgrammeIndividualPlanTableGUI\getManualStatusSelect(), ilStudyProgrammeUserProgress\isRelevant(), ilStudyProgrammeUserProgress\markAccredited(), ilStudyProgrammeUserProgress\markFailed(), ilStudyProgrammeUserProgress\markNotRelevant(), ilStudyProgrammeUserProgress\markRelevant(), ilStudyProgrammeUserProgressDB\statusToRepr(), ilStudyProgrammeUserProgressTest\testInitialProgressDraft(), ilStudyProgrammeUserProgressTest\testInitialProgressOutdated(), ilStudyProgrammeUserProgressTest\testMarkNotRelevant(), ilStudyProgrammeUserProgressTest\testNewNodesAreNotRelevant(), ilStudyProgrammeUserProgressTest\testOutdatedNodesCantBeSetToRelevant(), ilStudyProgrammeUserProgressTest\testPossibleActions(), ilStudyProgrammeProgressCalculationTest\testProgress3(), ilStudyProgrammeProgressCalculationTest\testProgress4(), ilStudyProgrammeUserProgress\updateFromProgramNode(), ilObjStudyProgrammeIndividualPlanGUI\updateStatus(), and ilStudyProgrammeUserProgress\updateStatus().