ILIAS
release_5-2 Revision v5.2.25-18-g3f80b828510
|
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... | |
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 |
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 | |
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 191 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 256 of file class.ilStudyProgrammeProgress.php.
References $points.
ilStudyProgrammeProgress::getAssignmentId | ( | ) |
Get the assignment, this progress belongs to.
Definition at line 212 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 362 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 287 of file class.ilStudyProgrammeProgress.php.
References $points_cur.
ilStudyProgrammeProgress::getLastChange | ( | ) |
Get the timestamp of the last change on this progress.
Definition at line 396 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 370 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 226 of file class.ilStudyProgrammeProgress.php.
References $prg_id.
ilStudyProgrammeProgress::getStatus | ( | ) |
Get the status the user has on this node.
Definition at line 315 of file class.ilStudyProgrammeProgress.php.
References $status.
ilStudyProgrammeProgress::getUserId | ( | ) |
Get the id of the user this progress is for.
Definition at line 240 of file class.ilStudyProgrammeProgress.php.
References $usr_id.
|
static |
Definition at line 46 of file class.ilStudyProgrammeProgress.php.
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 270 of file class.ilStudyProgrammeProgress.php.
References updateLastChange().
|
protected |
Definition at line 216 of file class.ilStudyProgrammeProgress.php.
ilStudyProgrammeProgress::setCompletionBy | ( | $a_id | ) |
Set the completion_by field.
$a_id | int | null |
Definition at line 347 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 299 of file class.ilStudyProgrammeProgress.php.
References updateLastChange().
Referenced by createFor().
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 424 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 382 of file class.ilStudyProgrammeProgress.php.
References ilObject\_lookupType().
|
protected |
Definition at line 230 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 329 of file class.ilStudyProgrammeProgress.php.
References updateLastChange().
Referenced by createFor().
|
protected |
Definition at line 244 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 410 of file class.ilStudyProgrammeProgress.php.
References IL_CAL_DATETIME, ilUtil\now(), and setLastChange().
Referenced by setAmountOfPoints(), setCompletionBy(), setCurrentAmountOfPoints(), and setStatus().
|
protected |
Definition at line 80 of file class.ilStudyProgrammeProgress.php.
Referenced by getAssignmentId().
|
protected |
Definition at line 157 of file class.ilStudyProgrammeProgress.php.
Referenced by getCompletionBy().
|
protected |
Definition at line 68 of file class.ilStudyProgrammeProgress.php.
|
protected |
Definition at line 170 of file class.ilStudyProgrammeProgress.php.
|
protected |
Definition at line 182 of file class.ilStudyProgrammeProgress.php.
Referenced by getLastChangeBy().
|
protected |
Definition at line 118 of file class.ilStudyProgrammeProgress.php.
Referenced by getAmountOfPoints().
|
protected |
Definition at line 130 of file class.ilStudyProgrammeProgress.php.
Referenced by getCurrentAmountOfPoints().
|
protected |
Definition at line 92 of file class.ilStudyProgrammeProgress.php.
Referenced by getNodeId().
|
static |
Definition at line 37 of file class.ilStudyProgrammeProgress.php.
|
protected |
Definition at line 142 of file class.ilStudyProgrammeProgress.php.
Referenced by getStatus().
|
protected |
Definition at line 105 of file class.ilStudyProgrammeProgress.php.
Referenced by getUserId().
const ilStudyProgrammeProgress::STATUS_ACCREDITED = 3 |
Definition at line 33 of file class.ilStudyProgrammeProgress.php.
Referenced by ilStudyProgrammeMembersTableGUI\fetchData(), ilStudyProgrammeIndividualPlanTableGUI\getManualStatusSelect(), ilStudyProgrammeUserProgress\getPossibleActions(), ilStudyProgrammeUserProgress\isAccredited(), ilStudyProgrammeUserProgress\isSuccessful(), ilStudyProgrammeUserProgress\markAccredited(), ilStudyProgrammeUserProgress\statusToRepr(), ilStudyProgrammeUserProgressTest\testMarkAccredited(), ilStudyProgrammeProgressCalculationTest\testProgress2(), ilStudyProgrammeUserProgress\unmarkAccredited(), ilObjStudyProgrammeIndividualPlanGUI\updateStatus(), and ilStudyProgrammeUserProgress\updateStatus().
const ilStudyProgrammeProgress::STATUS_COMPLETED = 2 |
Definition at line 30 of file class.ilStudyProgrammeProgress.php.
Referenced by ilStudyProgrammeMembersTableGUI\fetchData(), ilStudyProgrammeIndividualPlanTableGUI\getManualStatusSelect(), ilStudyProgrammeUserProgress\isSuccessful(), ilStudyProgrammeUserProgress\setLPCompleted(), ilStudyProgrammeUserProgress\statusToRepr(), ilStudyProgrammeProgressCalculationTest\testInitialProgressOnOptionalNodes(), ilStudyProgrammeUserProgressTest\testMarkAccredited(), ilStudyProgrammeProgressCalculationTest\testProgress1(), ilStudyProgrammeProgressCalculationTest\testProgress2(), ilStudyProgrammeProgressCalculationTest\testProgress3(), ilStudyProgrammeProgressCalculationTest\testProgress4(), ilStudyProgrammeUserProgress\updateFromProgramNode(), and ilStudyProgrammeUserProgress\updateStatus().
const ilStudyProgrammeProgress::STATUS_IN_PROGRESS = 1 |
Definition at line 27 of file class.ilStudyProgrammeProgress.php.
Referenced by createFor(), ilStudyProgrammeUserProgress\getPossibleActions(), ilStudyProgrammeIndividualPlanTableGUI\getRequiredPointsInput(), ilStudyProgrammeUserProgress\markRelevant(), ilStudyProgrammeUserProgress\statusToRepr(), ilStudyProgrammeUserProgressTest\testInitialProgressActive(), ilStudyProgrammeUserProgressTest\testInitialProgressDraft(), ilStudyProgrammeProgressCalculationTest\testInitialProgressOnOptionalNodes(), ilStudyProgrammeUserProgressTest\testInitialProgressOutdated(), ilStudyProgrammeUserProgressTest\testMarkAccredited(), ilStudyProgrammeUserProgressTest\testMarkNotRelevant(), ilStudyProgrammeProgressCalculationTest\testProgress4(), ilStudyProgrammeUserProgressTest\testUnmarkAccredited(), ilStudyProgrammeUserProgress\unmarkAccredited(), ilStudyProgrammeUserProgress\updateFromProgramNode(), ilObjStudyProgrammeIndividualPlanGUI\updateRequiredPoints(), ilObjStudyProgrammeIndividualPlanGUI\updateStatus(), and ilStudyProgrammeUserProgress\updateStatus().
const ilStudyProgrammeProgress::STATUS_NOT_RELEVANT = 4 |
Definition at line 35 of file class.ilStudyProgrammeProgress.php.
Referenced by ilStudyProgrammeUserAssignment\addMissingProgresses(), ilObjStudyProgramme\assignUser(), ilObjStudyProgramme\canBeRemoved(), ilStudyProgrammeIndividualPlanTableGUI\getManualStatusSelect(), ilStudyProgrammeUserProgress\isRelevant(), ilStudyProgrammeUserProgress\markAccredited(), ilStudyProgrammeUserProgress\markNotRelevant(), ilStudyProgrammeUserProgress\markRelevant(), ilStudyProgrammeUserProgress\statusToRepr(), ilStudyProgrammeUserProgressTest\testInitialProgressDraft(), ilStudyProgrammeUserProgressTest\testInitialProgressOutdated(), ilStudyProgrammeUserProgressTest\testMarkNotRelevant(), ilStudyProgrammeUserProgressTest\testNewNodesAreNotRelevant(), ilStudyProgrammeUserProgressTest\testOutdatedNodesCantBeSetToRelevant(), ilStudyProgrammeProgressCalculationTest\testProgress3(), ilStudyProgrammeProgressCalculationTest\testProgress4(), ilStudyProgrammeUserProgress\updateFromProgramNode(), ilObjStudyProgrammeIndividualPlanGUI\updateStatus(), and ilStudyProgrammeUserProgress\updateStatus().