5 require_once(dirname(__FILE__).
"/../../../../Services/ActiveRecord/class.ActiveRecord.php");
47 return "prg_usr_progress";
194 $prg->setAssignmentId($a_ass->
getId())
200 ->setCompletionBy(null)
201 ->setLastChangeBy(null)
217 $this->assignment_id = $a_id;
231 $this->prg_id = $a_id;
245 $this->usr_id = $a_id;
271 if (!is_numeric($a_points) || $a_points < 0) {
272 throw new ilException(
"ilStudyProgrammeProgress::setAmountOfPoints: " 273 .
"Expected a number >= 0 as argument, got '$a_points'");
276 $this->points = (int)$a_points;
300 if (!is_numeric($a_points) || $a_points < 0) {
301 throw new ilException(
"ilStudyProgrammeProgress::setCurrentAmountOfPoints: " 302 .
"Expected a number >= 0 as argument, got '$a_points'.");
305 $this->points_cur = (int)$a_points;
330 $a_status = (int)$a_status;
331 if (!in_array($a_status, self::$STATUS)) {
332 throw new ilException(
"ilStudyProgrammeProgress::setStatus: No status: " 336 $this->status = $a_status;
348 if ($a_id !== null) {
351 $this->completion_by = $a_id;
384 throw new ilException(
"ilStudyProgrammeProgress::setLastChangeBy: '$a_usr_id' " 385 .
"is no id of a user.");
387 $this->last_change_by = $a_usr_id;
426 throw new ilException(
"ilStudyProgrammeProgress::setLastChange: Given " 427 .
"timestamp is before current timestamp. That " 428 .
"is logically impossible.");
Base class for ILIAS Exception handling.
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.
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.
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.