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. |
KuoteObjects_Enrollment __construct(
)
|
|
Constructor instantiates $enrollment as a DataObjects_Enrollment object.
API Tags:
Information Tags:
Removes the object from the datastore based on it's Id
API Tags:
Return: | True on success, false otherwise. |
Access: | public |
boolean get(
integer
$id
)
|
|
Loads the object from the data store by its unique identifier.
Parameters:
integer |
$id: |
Unique identifier of a course in the data store. |
API Tags:
Return: | True on success, false otherwise. |
Access: | public |
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 unique id of the object
API Tags:
Return: | The objects's unique id |
Access: | public |
Returns the id of the User for this enrollment.
API Tags:
Return: | User Id. |
Access: | public |
Takes the currently set properties of the object and inserts them into the data store as a new instance with its own unique id.
API Tags:
Return: | True on success, false otherwise. |
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 |
Updates the datastore to reflect the currently set properties of the object.
Updates by the current Id.
API Tags:
Return: | True on success, false otherwise. |
Access: | public |