5 require_once(dirname(__FILE__) .
"/../../../../Services/ActiveRecord/class.ActiveRecord.php");
52 return "prg_usr_progress";
209 $prg->setAssignmentId($a_ass->
getId())
215 ->setCompletionBy(null)
216 ->setLastChangeBy(null)
234 $this->assignment_id = $a_id;
250 $this->prg_id = $a_id;
266 $this->usr_id = $a_id;
294 if (!is_numeric($a_points) || $a_points < 0) {
295 throw new ilException(
"ilStudyProgrammeProgress::setAmountOfPoints: " 296 .
"Expected a number >= 0 as argument, got '$a_points'");
299 $this->points = (int) $a_points;
325 if (!is_numeric($a_points) || $a_points < 0) {
326 throw new ilException(
"ilStudyProgrammeProgress::setCurrentAmountOfPoints: " 327 .
"Expected a number >= 0 as argument, got '$a_points'.");
330 $this->points_cur = (int) $a_points;
357 $a_status = (int) $a_status;
358 if (!in_array($a_status, self::$STATUS)) {
359 throw new ilException(
"ilStudyProgrammeProgress::setStatus: No status: " 363 $this->status = $a_status;
376 if ($a_id !== null) {
379 $this->completion_by = $a_id;
415 throw new ilException(
"ilStudyProgrammeProgress::setLastChangeBy: '$a_usr_id' " 416 .
"is no id of a user.");
418 $this->last_change_by = $a_usr_id;
460 throw new ilException(
"ilStudyProgrammeProgress::setLastChange: Given " 461 .
"timestamp is before current timestamp. That " 462 .
"is logically impossible.");
476 if ($this->deadline !== null) {
static createFor(ilStudyProgramme $a_prg, ilStudyProgrammeAssignment $a_ass)
Create a new progress object for a given program node and assignment.
getUserId()
Get the id of the user who is assigned.
static returnDbTableName()
getAssignmentId()
Get the assignment, this progress belongs to.
getLastChangeBy()
Get the id of the user who did the last change on this assignment.
static _before(ilDateTime $start, ilDateTime $end, $a_compare_field='', $a_tz='')
compare two dates and check start is before end This method does not consider tz offsets.
getCurrentAmountOfPoints()
Get the amount of points the user currently has achieved on the node.
setStatus($a_status)
Set the status of this node.
setLastChangeBy($a_usr_id)
Set the id of the user who did the last change on this progress.
getDeadline()
Get the deadline of this progress.
setCompletionBy($a_id)
Set the completion_by field.
getCompletionBy()
Get the id of object or user that lead to the successful completion of this node. ...
static now()
Return current timestamp in Y-m-d H:i:s format.
setCurrentAmountOfPoints($a_points)
Set the amount of points the user currently has achieved on this node.
getObjId()
Get the id of the study program.
getStatus()
Get the status the user has on this node.
updateLastChange()
Update the last change timestamp to the current time.
getAmountOfPoints()
Get the amount of points the user needs to achieve on the subnodes of this node.
getPoints()
Get the amount of points.
Class ilStudyProgrammeAssignment.
const STATUS_NOT_RELEVANT
get($a_format, $a_format_str='', $a_tz='')
get formatted date
Create styles array
The data for the language used.
static _lookupType($a_id, $a_reference=false)
lookup object type
getUserId()
Get the id of the user this progress is for.
Class ilStudyProgrammeProgress.
setDeadline(ilDateTime $deadline=null)
Set the deadline of this progress.
getLastChange()
Get the timestamp of the last change on this progress.
setAmountOfPoints($a_points)
Get the amount of points the user needs to achieve on the subnodes of this node.
getNodeId()
Get the id of the program node this progress belongs to.
setLastChange(ilDateTime $a_timestamp)
Set the last change timestamp to the given time.
getId()
Get the id of the assignment.