40 public static $STATUS = array( self::STATUS_IN_PROGRESS
41 , self::STATUS_COMPLETED
42 , self::STATUS_ACCREDITED
43 , self::STATUS_NOT_RELEVANT
192 $this->assignment_id = $a_id;
204 $this->prg_id = $a_id;
216 $this->usr_id = $a_id;
240 throw new ilException(
"ilStudyProgrammeProgress::setAmountOfPoints: " 241 .
"Expected a number >= 0 as argument, got '$a_points'");
244 $this->points = $a_points;
269 throw new ilException(
"ilStudyProgrammeProgress::setCurrentAmountOfPoints: " 270 .
"Expected a number >= 0 as argument, got '$a_points'.");
273 $this->points_cur = $a_points;
295 if (!in_array($a_status, self::$STATUS)) {
296 throw new ilException(
"ilStudyProgrammeProgress::setStatus: No status: " 300 $this->status = $a_status;
313 $this->completion_by = $a_id;
348 if (is_null($a_usr_id) || $a_usr_id < 0) {
349 throw new ilException(
"ilStudyProgrammeProgress::setLastChangeBy: '$a_usr_id' " 350 .
"is no id of a user.");
352 $this->last_change_by = $a_usr_id;
363 return DateTime::createFromFormat(self::DATE_TIME_FORMAT, $this->last_change);
393 $this->last_change = $a_timestamp->format(self::DATE_TIME_FORMAT);
461 $this->vq_date = $date;
478 if (!$this->vq_date || $this->vq_date->format(
'Y-m-d') > date(
'Y-m-d')) {
479 throw new ilException(
"may not invalidate non-expired progress");
481 $this->invalidated =
true;
setLastChangeBy(int $a_usr_id=null)
Set the id of the user who did the last change on this progress.
getAssignmentId()
Get the assignment, this progress belongs to.
setCompletionBy(int $a_id=null)
Set the completion_by field.
getLastChangeBy()
Get the id of the user who did the last change on this assignment.
getCurrentAmountOfPoints()
Get the amount of points the user currently has achieved on the node.
getDeadline()
Get the deadline of this progress.
getCompletionDate()
Get the timestamp of the complition of this progress.
getCompletionBy()
Get the id of object or user that lead to the successful completion of this node. ...
setCompletionDate(DateTime $completion_date=null)
Set the timestamp of the complition of this progress.
getId()
Get the id of the progress.
getStatus()
Get the status the user has on this node.
setDeadline(DateTime $deadline=null)
Set the deadline of this progress.
setCurrentAmountOfPoints(int $a_points)
Set the amount of points the user currently has achieved on this node.
updateLastChange()
Update the last change timestamp to the current time.
setStatus(int $a_status)
Set the status of this node.
setValidityOfQualification(DateTime $date=null)
Set limited validity of qualification date.
setLastChange(DateTime $a_timestamp)
Set the last change timestamp to the given time.
setAssignmentId(int $a_id)
setAssignmentDate(DateTime $assignment_date)
Set the date of assignment.
getAmountOfPoints()
Get the amount of points the user needs to achieve on the subnodes of this node.
const STATUS_NOT_RELEVANT
getUserId()
Get the id of the user this progress is for.
Class ilStudyProgrammeProgress.
setAmountOfPoints(int $a_points)
Get the amount of points the user needs to achieve on the subnodes of this node.
getAssignmentDate()
Get the date of assignment.
getLastChange()
Get the timestamp of the last change on this progress.
getNodeId()
Get the id of the program node this progress belongs to.
invalidate()
Toggle invalidated.
getValidityOfQualification()
Get the limited validity of qualification date.