ILIAS
release_6 Revision v6.24-5-g0c8bfefb3b8
|
Class ilStudyProgrammeAssignment. More...
Public Member Functions | |
__construct (int $id) | |
getId () | |
Get the id of the assignment. More... | |
getRootId () | |
Get the object id of the program the user was assigned to. More... | |
setRootId (int $id) | |
getUserId () | |
Get the id of the user who is assigned. More... | |
setUserId (int $usr_id) | |
getLastChangeBy () | |
Get the id of the user who did the last change on this assignment. More... | |
setLastChangeBy (int $assigned_by_id) | |
Set the id of the user who did the last change on this assignment. More... | |
getLastChange () | |
Get the timestamp of the last change on this program or a sub program. More... | |
updateLastChange () | |
Update the last change timestamp to the current time. More... | |
setLastChange (DateTime $timestamp) | |
Set the last change timestamp to the given time. More... | |
setRestartDate (DateTime $date=null) | |
Set the date, at which the user is to be reassigned to the programme. More... | |
getRestartDate () | |
Get the date, at which the user is to be reassigned to the programme. More... | |
setRestartedAssignmentId (int $id) | |
Set the id of the assignment which was intiated due to expiring progress of this assignment. More... | |
getRestartedAssignmentId () | |
Get the id of the assignment which was intiated due to expiring progress of this assignment. More... | |
Data Fields | |
const | NO_RESTARTED_ASSIGNMENT = -1 |
const | DATE_TIME_FORMAT = 'Y-m-d H:i:s' |
const | DATE_FORMAT = 'Y-m-d' |
const | AUTO_ASSIGNED_BY_ROLE = -1 |
const | AUTO_ASSIGNED_BY_ORGU = -2 |
const | AUTO_ASSIGNED_BY_COURSE = -3 |
const | AUTO_ASSIGNED_BY_GROUP = -4 |
Protected Attributes | |
$id | |
$usr_id | |
$root_prg_id | |
$last_change | |
$last_change_by | |
$restart_date | |
$restarted_asssignment_id = self::NO_RESTARTED_ASSIGNMENT | |
Class ilStudyProgrammeAssignment.
Represents one assignment of the user to a program tree.
One user can have multiple assignments to the same tree. This makes it possible to represent programs that need to be accomplished periodically as well.
Definition at line 18 of file class.ilStudyProgrammeAssignment.php.
ilStudyProgrammeAssignment::__construct | ( | int | $id | ) |
ilStudyProgrammeAssignment::getId | ( | ) |
Get the id of the assignment.
Definition at line 94 of file class.ilStudyProgrammeAssignment.php.
References $id.
Referenced by ilStudyProgrammeProgressDBRepository\createFor(), and ilStudyProgrammeAssignmentDBRepository\update().
ilStudyProgrammeAssignment::getLastChange | ( | ) |
Get the timestamp of the last change on this program or a sub program.
Definition at line 174 of file class.ilStudyProgrammeAssignment.php.
Referenced by ilObjStudyProgramme\getAssignmentsRaw(), and ilStudyProgrammeAssignmentDBRepository\update().
ilStudyProgrammeAssignment::getLastChangeBy | ( | ) |
Get the id of the user who did the last change on this assignment.
Definition at line 136 of file class.ilStudyProgrammeAssignment.php.
References $last_change_by.
Referenced by ilStudyProgrammeAssignmentDBRepository\update().
ilStudyProgrammeAssignment::getRestartDate | ( | ) |
Get the date, at which the user is to be reassigned to the programme.
Definition at line 215 of file class.ilStudyProgrammeAssignment.php.
References $restart_date.
Referenced by ilStudyProgrammeAssignmentDBRepository\update().
ilStudyProgrammeAssignment::getRestartedAssignmentId | ( | ) |
Get the id of the assignment which was intiated due to expiring progress of this assignment.
Definition at line 234 of file class.ilStudyProgrammeAssignment.php.
References $restarted_asssignment_id.
Referenced by ilStudyProgrammeAssignmentDBRepository\update().
ilStudyProgrammeAssignment::getRootId | ( | ) |
Get the object id of the program the user was assigned to.
Definition at line 104 of file class.ilStudyProgrammeAssignment.php.
References $root_prg_id.
Referenced by ilStudyProgrammeAssignmentDBRepository\update().
ilStudyProgrammeAssignment::getUserId | ( | ) |
Get the id of the user who is assigned.
Definition at line 120 of file class.ilStudyProgrammeAssignment.php.
References $usr_id.
Referenced by ilStudyProgrammeProgressDBRepository\createFor(), and ilStudyProgrammeAssignmentDBRepository\update().
ilStudyProgrammeAssignment::setLastChange | ( | DateTime | $timestamp | ) |
Set the last change timestamp to the given time.
Definition at line 195 of file class.ilStudyProgrammeAssignment.php.
Referenced by updateLastChange().
ilStudyProgrammeAssignment::setLastChangeBy | ( | int | $assigned_by_id | ) |
Set the id of the user who did the last change on this assignment.
Throws when $a_usr_id is not the id of a user.
ilException |
Definition at line 149 of file class.ilStudyProgrammeAssignment.php.
References ilObject\_exists(), and ilObject\_lookupType().
ilStudyProgrammeAssignment::setRestartDate | ( | DateTime | $date = null | ) |
Set the date, at which the user is to be reassigned to the programme.
Definition at line 204 of file class.ilStudyProgrammeAssignment.php.
Referenced by ilStudyProgrammeUserProgress\maybeLimitProgressValidity().
ilStudyProgrammeAssignment::setRestartedAssignmentId | ( | int | $id | ) |
Set the id of the assignment which was intiated due to expiring progress of this assignment.
Definition at line 223 of file class.ilStudyProgrammeAssignment.php.
References $id.
ilStudyProgrammeAssignment::setRootId | ( | int | $id | ) |
Definition at line 109 of file class.ilStudyProgrammeAssignment.php.
References $id.
Referenced by ilStudyProgrammeAssignmentDBRepository\assignmentByRow().
ilStudyProgrammeAssignment::setUserId | ( | int | $usr_id | ) |
Definition at line 125 of file class.ilStudyProgrammeAssignment.php.
References $usr_id.
ilStudyProgrammeAssignment::updateLastChange | ( | ) |
Update the last change timestamp to the current time.
Definition at line 184 of file class.ilStudyProgrammeAssignment.php.
References setLastChange().
|
protected |
Definition at line 36 of file class.ilStudyProgrammeAssignment.php.
Referenced by __construct(), getId(), setRestartedAssignmentId(), and setRootId().
|
protected |
Definition at line 59 of file class.ilStudyProgrammeAssignment.php.
|
protected |
Definition at line 66 of file class.ilStudyProgrammeAssignment.php.
Referenced by getLastChangeBy().
|
protected |
Definition at line 73 of file class.ilStudyProgrammeAssignment.php.
Referenced by getRestartDate().
|
protected |
Definition at line 81 of file class.ilStudyProgrammeAssignment.php.
Referenced by getRestartedAssignmentId().
|
protected |
Definition at line 51 of file class.ilStudyProgrammeAssignment.php.
Referenced by getRootId().
|
protected |
Definition at line 43 of file class.ilStudyProgrammeAssignment.php.
Referenced by getUserId(), and setUserId().
const ilStudyProgrammeAssignment::AUTO_ASSIGNED_BY_COURSE = -3 |
Definition at line 27 of file class.ilStudyProgrammeAssignment.php.
const ilStudyProgrammeAssignment::AUTO_ASSIGNED_BY_GROUP = -4 |
Definition at line 28 of file class.ilStudyProgrammeAssignment.php.
const ilStudyProgrammeAssignment::AUTO_ASSIGNED_BY_ORGU = -2 |
Definition at line 26 of file class.ilStudyProgrammeAssignment.php.
const ilStudyProgrammeAssignment::AUTO_ASSIGNED_BY_ROLE = -1 |
Definition at line 25 of file class.ilStudyProgrammeAssignment.php.
const ilStudyProgrammeAssignment::DATE_FORMAT = 'Y-m-d' |
Definition at line 23 of file class.ilStudyProgrammeAssignment.php.
Referenced by ilStudyProgrammeAssignmentDBRepository\getDueToRestartBaseSQL(), and ilStudyProgrammeAssignmentDBRepository\loadDueToManuelRestart().
const ilStudyProgrammeAssignment::DATE_TIME_FORMAT = 'Y-m-d H:i:s' |
Definition at line 22 of file class.ilStudyProgrammeAssignment.php.
Referenced by ilStudyProgrammeAssignmentDBRepository\assignmentByRow(), and ilStudyProgrammeAssignmentDBRepository\update().
const ilStudyProgrammeAssignment::NO_RESTARTED_ASSIGNMENT = -1 |
Definition at line 20 of file class.ilStudyProgrammeAssignment.php.
Referenced by ilStudyProgrammeAssignmentDBRepository\createFor(), ilStudyProgrammeAssignmentDBRepository\getDueToRestartBaseSQL(), ilStudyProgrammeAssignmentDBRepository\loadDueToManuelRestart(), ilStudyProgrammeAssignmentRepositoryTest\test_create(), ilStudyProgrammeAssignmentTest\test_restarted_assigment(), and ilStudyProgrammeUserAssignmentTest\testRstartAssignment().