static boolean enroll(
integer
$userId, integer
$courseOfferingId
)
|
|
Creates a new enrollment for the given User Id and Course Offering Id.
Parameters:
integer |
$userId: |
The id of the User. |
integer |
$courseOfferingId: |
The id of the Course Offering the user is to enroll in. |
API Tags:
Return: | True on successful set, false otherwise. |
Access: | public |
Information Tags:
Throws: | Exception 2 on failure. |
Throws: | Exception 3 if already enrolled. |
In theory, every combination of User Id and Course Offering Id should be unique.
This method loads into the object this first intance of a 'row' containing both values.
Parameters:
API Tags:
Return: | True on success. |
Access: | public |
Information Tags:
Throws: | Exception 1 if no enrollment found. |
integer getCourseOfferingId(
)
|
|
Returns the id of the Course Offering for this enrollment.
API Tags:
Return: | Course Offering Id. |
Access: | public |
Returns the current grade for this enrollment.
API Tags:
Return: | Grade as a percentage. |
Access: | public |
Returns the id of the User for this enrollment.
API Tags:
Return: | User Id. |
Access: | public |
boolean setCourseOfferingId(
integer
$id
)
|
|
Sets the id of the Course Offering for this enrollment.
Parameters:
integer |
$id: |
The Course Offering Id. |
API Tags:
Return: | True on successful set, false otherwise. |
Access: | public |
boolean setGrade(
integer
$grade
)
|
|
Sets the current grade for this enrollment.
Parameters:
integer |
$grade: |
The grade as a percentage. |
API Tags:
Return: | True on successful set, false otherwise. |
Access: | public |
boolean setUserId(
integer
$id
)
|
|
Sets the id of the User for this enrollment.
Parameters:
integer |
$id: |
The User Id. |
API Tags:
Return: | True on successful set, false otherwise. |
Access: | public |