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;
An exception for terminatinating execution or to throw for unit testing.
Base class for ILIAS Exception handling.
Class ilStudyProgrammeProgress.
setAssignmentDate(DateTime $assignment_date)
Set the date of assignment.
getId()
Get the id of the progress.
setAssignmentId(int $a_id)
setCurrentAmountOfPoints(int $a_points)
Set the amount of points the user currently has achieved on this node.
getAssignmentDate()
Get the date of assignment.
setStatus(int $a_status)
Set the status of this node.
setCompletionDate(DateTime $completion_date=null)
Set the timestamp of the complition of this progress.
setLastChangeBy(int $a_usr_id=null)
Set the id of the user who did the last change on this progress.
setCompletionBy(int $a_id=null)
Set the completion_by field.
setValidityOfQualification(DateTime $date=null)
Set limited validity of qualification date.
getAssignmentId()
Get the assignment, this progress belongs to.
invalidate()
Toggle invalidated.
const STATUS_NOT_RELEVANT
getAmountOfPoints()
Get the amount of points the user needs to achieve on the subnodes of this node.
getStatus()
Get the status the user has on this node.
getUserId()
Get the id of the user this progress is for.
getValidityOfQualification()
Get the limited validity of qualification date.
setAmountOfPoints(int $a_points)
Get the amount of points the user needs to achieve on the subnodes of this node.
setDeadline(DateTime $deadline=null)
Set the deadline of this progress.
getLastChange()
Get the timestamp of the last change on this progress.
updateLastChange()
Update the last change timestamp to the current time.
getCompletionBy()
Get the id of object or user that lead to the successful completion of this node.
getLastChangeBy()
Get the id of the user who did the last change on this assignment.
setLastChange(DateTime $a_timestamp)
Set the last change timestamp to the given time.
getCurrentAmountOfPoints()
Get the amount of points the user currently has achieved on the node.
getCompletionDate()
Get the timestamp of the complition of this progress.
getNodeId()
Get the id of the program node this progress belongs to.
getDeadline()
Get the deadline of this progress.