ILIAS
release_5-3 Revision v5.3.23-19-g915713cf615
|
Represents one assignment of a user to a study programme. More...
Public Member Functions | |
__construct ($a_id_or_model, \ilStudyProgrammeUserProgressDB $sp_user_progress_db) | |
Throws when id does not refer to a study programme assignment. More... | |
getId () | |
Get the id of the assignment. More... | |
getStudyProgramme () | |
Get the program node where this assignment was made. More... | |
getRootProgress () | |
Get the progress on the root node of the programme. More... | |
getUserId () | |
Get the id of the user who is assigned. More... | |
deassign () | |
Remove this assignment. More... | |
delete () | |
Delete the assignment from database. More... | |
addMissingProgresses () | |
Add missing progresses for new nodes in the programm. More... | |
Static Public Member Functions | |
static | getInstance ($a_id) |
Get an instance. More... | |
static | getInstancesOfUser ($a_user_id) |
Get all instances for a given user. More... | |
static | getInstancesForProgram ($a_program_id) |
Get all assignments that were made to the given program. More... | |
Data Fields | |
$assignment | |
Private Attributes | |
$sp_user_progress_db | |
Represents one assignment of a user to a study programme.
A user could have multiple assignments per programme.
Definition at line 14 of file class.ilStudyProgrammeUserAssignment.php.
ilStudyProgrammeUserAssignment::__construct | ( | $a_id_or_model, | |
\ilStudyProgrammeUserProgressDB | $sp_user_progress_db | ||
) |
Throws when id does not refer to a study programme assignment.
ilException |
int | ilStudyProgrammeAssignment | $a_id_or_model |
Definition at line 29 of file class.ilStudyProgrammeUserAssignment.php.
References $sp_user_progress_db.
ilStudyProgrammeUserAssignment::addMissingProgresses | ( | ) |
Add missing progresses for new nodes in the programm.
The new progresses will be set to not relevant.
Definition at line 202 of file class.ilStudyProgrammeUserAssignment.php.
References $assignment, $DIC, $id, $ilLog, ilStudyProgrammeProgress\createFor(), getId(), getStudyProgramme(), and ilStudyProgrammeProgress\STATUS_NOT_RELEVANT.
ilStudyProgrammeUserAssignment::deassign | ( | ) |
Remove this assignment.
Definition at line 154 of file class.ilStudyProgrammeUserAssignment.php.
References getStudyProgramme().
ilStudyProgrammeUserAssignment::delete | ( | ) |
Delete the assignment from database.
Definition at line 162 of file class.ilStudyProgrammeUserAssignment.php.
References $id, getId(), and getStudyProgramme().
Referenced by ilObjStudyProgramme\removeAssignment().
ilStudyProgrammeUserAssignment::getId | ( | ) |
Get the id of the assignment.
Definition at line 105 of file class.ilStudyProgrammeUserAssignment.php.
Referenced by addMissingProgresses(), delete(), getRootProgress(), ilPDStudyProgrammeExpandableListGUI\new_ilStudyProgrammeAssignmentListGUI(), ilPDStudyProgrammeSimpleListGUI\new_ilStudyProgrammeAssignmentListGUI(), ilObjStudyProgramme\removeAssignment(), ilStudyProgrammeEvents\userAssigned(), and ilStudyProgrammeEvents\userDeassigned().
|
static |
Get an instance.
Just wraps constructor.
ilException |
int | $a_id |
Definition at line 50 of file class.ilStudyProgrammeUserAssignment.php.
References ilObjStudyProgramme\_getStudyProgrammeUserProgressDB().
Referenced by ilStudyProgrammeUserProgress\getAssignment(), and ilObjStudyProgrammeIndividualPlanGUI\getAssignmentObject().
|
static |
Get all assignments that were made to the given program.
int | $a_program_id |
Definition at line 91 of file class.ilStudyProgrammeUserAssignment.php.
References ilObjStudyProgramme\_getStudyProgrammeUserProgressDB(), array, and ActiveRecord\where().
Referenced by ilObjStudyProgramme\updateAllAssignments().
|
static |
Get all instances for a given user.
int | $a_user_id |
Definition at line 61 of file class.ilStudyProgrammeUserAssignment.php.
References $DIC, $ret, ilObject\_getAllReferences(), ilObjStudyProgramme\_getStudyProgrammeUserProgressDB(), array, and ActiveRecord\where().
Referenced by ilStudyProgrammeAppEventListener\onServiceUserDeleteUser(), and ilPDStudyProgrammeSimpleListGUI\readUsersAssignments().
ilStudyProgrammeUserAssignment::getRootProgress | ( | ) |
Get the progress on the root node of the programme.
ilException |
Definition at line 136 of file class.ilStudyProgrammeUserAssignment.php.
References getId(), and getStudyProgramme().
ilStudyProgrammeUserAssignment::getStudyProgramme | ( | ) |
Get the program node where this assignment was made.
Throws when program this assignment is about has no ref id.
ilException |
Definition at line 118 of file class.ilStudyProgrammeUserAssignment.php.
References ilObject\_getAllReferences(), and ilObjStudyProgramme\getInstanceByRefId().
Referenced by addMissingProgresses(), deassign(), delete(), getRootProgress(), ilPDStudyProgrammeSimpleListGUI\hasPermission(), ilPDStudyProgrammeExpandableListGUI\new_ilStudyProgrammeAssignmentListGUI(), ilPDStudyProgrammeSimpleListGUI\new_ilStudyProgrammeAssignmentListGUI(), ilObjStudyProgramme\removeAssignment(), ilStudyProgrammeEvents\userAssigned(), and ilStudyProgrammeEvents\userDeassigned().
ilStudyProgrammeUserAssignment::getUserId | ( | ) |
Get the id of the user who is assigned.
Definition at line 146 of file class.ilStudyProgrammeUserAssignment.php.
Referenced by ilStudyProgrammeEvents\userAssigned(), and ilStudyProgrammeEvents\userDeassigned().
ilStudyProgrammeUserAssignment::$assignment |
Definition at line 16 of file class.ilStudyProgrammeUserAssignment.php.
Referenced by addMissingProgresses().
|
private |
Definition at line 21 of file class.ilStudyProgrammeUserAssignment.php.
Referenced by __construct().