phpDocumentor KuoteInterfaces
Object
[ class tree: KuoteInterfaces ] [ index: KuoteInterfaces ] [ all elements ]

Interface: KuoteInterfaces_Enrollment

Source Location: /classes/KuoteInterfaces/Enrollment.php

Interface KuoteInterfaces_Enrollment

Interface Overview

KuoteInterfaces_Enrollment This intefaces defines the set of methods that all Enrollment implementations need to function as part of the Kuote System.

Located in /classes/KuoteInterfaces/Enrollment.php [line 18]



		
				Author(s):
		
  • Kyle Hall
Information Tags:
Copyright:  2006

Methods

[ Top ]
Method Summary
static boolean   enroll()   Creates a new enrollment for the given User Id and Course Offering Id.
boolean   getByUserAndCourseOffering()   In theory, every combination of User Id and Course Offering Id should be unique.
integer   getCourseOfferingId()   Returns the id of the Course Offering for this enrollment.
integer   getGrade()   Returns the current grade for this enrollment.
integer   getUserId()   Returns the id of the User for this enrollment.
boolean   setCourseOfferingId()   Sets the id of the Course Offering for this enrollment.
boolean   setGrade()   Sets the current grade for this enrollment.
boolean   setUserId()   Sets the id of the User for this enrollment.

[ Top ]
Methods
static method enroll  [line 86]

  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.

[ Top ]
getByUserAndCourseOffering  [line 29]

  boolean getByUserAndCourseOffering( KuoteObjects_User $user, KuoteObjects_CourseOffering $courseOffering  )

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:
KuoteObjects_User   $user:  This user to look up.
KuoteObjects_CourseOffering   $courseOffering:  The course offering to look up.

API Tags:
Return:  True on success.
Access:  public

Information Tags:
Throws:  Exception 1 if no enrollment found.

[ Top ]
getCourseOfferingId  [line 66]

  integer getCourseOfferingId( )

Returns the id of the Course Offering for this enrollment.


API Tags:
Return:  Course Offering Id.
Access:  public


[ Top ]
getGrade  [line 36]

  integer getGrade( )

Returns the current grade for this enrollment.


API Tags:
Return:  Grade as a percentage.
Access:  public


[ Top ]
getUserId  [line 51]

  integer getUserId( )

Returns the id of the User for this enrollment.


API Tags:
Return:  User Id.
Access:  public


[ Top ]
setCourseOfferingId  [line 74]

  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


[ Top ]
setGrade  [line 44]

  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


[ Top ]
setUserId  [line 59]

  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


[ Top ]

Documentation generated on Fri, 15 Dec 2006 11:17:30 -0500 by phpDocumentor 1.3.0