phpDocumentor KuoteObjects
CourseOffering
[ class tree: KuoteObjects ] [ index: KuoteObjects ] [ all elements ]

Class: KuoteObjects_CourseOffering

Source Location: /classes/KuoteObjects/CourseOffering.php

Class KuoteObjects_CourseOffering

Class Overview

Implements interfaces:

KuoteObjects CourseOffering

The KuoteObjects CourseOffering represents an offering (to make a course available to take) of a course in the Kuote system. It must implement the interfaces KuoteInterfaces_Object, and KuoteInterfaces_CourseOffering.

Anytime an instructor wants to make a course available for students to take, they must 'offer' the course, choosing a time period for it to be available, and to whom. The CourseOffering represents this offering in the datastore.

Located in /classes/KuoteObjects/CourseOffering.php [line 24]



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

Properties

Methods

[ Top ]
Property Summary
mixed   $courseOffering   Private variable to contain a DB_DataObjects object derived from MySQL or another DB.

[ Top ]
Method Summary
static array   getCourseOfferingsHash()   Returns a hashed array of course offerings created by the given user.
boolean   __construct()   Constructor instantiates $courseOffering as a DataObjects_CourseOffering object.
boolean   delete()   Removes the course offering from the datastore based on the Id.
boolean   get()   Loads the object from the data store by its unique identifier.
integer   getCourseId()   Returns the id of the course which this offering represents.
string   getEnd()   Returns the end date of the offering in the form "YYYY-MM-DD".
array   getEnrolledCourseOfferingsHash()   Returns a hashed array of the format
  1. $courseOfferingId => $courseOfferingTitle
integer   getId()   Returns the unique id of the course offering.
string   getPassword()   Returns the hash of the course offering's password.
string   getStart()   Returns the start date of the offering in the form "YYYY-MM-DD".
string   getTitle()   Returns the title of the course offering.
integer   getUserId()   Returns the id of the user which has created this offering.
boolean   hasPassword()   Returns true if the offering is password protected, false if not.
boolean   insert()   Takes the currently set properties of the offering and inserts them into the data store as a new offering with its own unique id.
boolean   load()   Loads the given DataObjects_CourseOffering object into the private var for such.
HTML_QuickForm   returnCourseOfferingEnrollmentPasswordForm()   Returns an HTML_QuickForm object to request a password for to access a course offering
boolean   setCourseId()   Sets the id of the course which this offering represents.
boolean   setEnd()   Sets the ending date of an offering.
boolean   setPassword()   Sets the password of an offering.
boolean   setStart()   Sets the starting date of an offering.
boolean   setTitle()   Sets the title of the course offering.
boolean   setUserId()   Sets the id of the user which has created this offering.
boolean   update()   Updates the datastore to reflect the currently set properties of the object.
boolean   verifyPassword()   Compares the password of the offering with the passed password.

[ Top ]
Properties
mixed   $courseOffering [line 30]

Private variable to contain a DB_DataObjects object derived from MySQL or another DB.

API Tags:
Access:  protected


[ Top ]
Methods
static method getCourseOfferingsHash  [line 246]

  static array getCourseOfferingsHash( KuoteObjects_User $user  )

Returns a hashed array of course offerings created by the given user.

Returns a hashed array of the format

  1. $courseOfferingId => $courseOfferingTitle

Parameters:
KuoteObjects_User   $user:  User for which to find created courses.

API Tags:
Return:  Hashed array of
  1. $courseOfferingId => $courseOfferingTitle
.
Access:  public


[ Top ]
Constructor __construct  [line 37]

  boolean __construct( )

Constructor instantiates $courseOffering as a DataObjects_CourseOffering object.


API Tags:
Return:  True on success, false otherwise.
Access:  public

Information Tags:
Link:  http://pear.php.net/package/DB_DataObject/

[ Top ]
delete  [line 76]

  boolean delete( )

Removes the course offering from the datastore based on the Id.


API Tags:
Return:  True on success, false otherwise.
Access:  public


[ Top ]
get  [line 47]

  boolean get( integer $id  )

Loads the object from the data store by its unique identifier.

Parameters:
integer   $id:  Unique identifier of a course offering in the data store.

API Tags:
Return:  True on success, false otherwise.
Access:  public


[ Top ]
getCourseId  [line 203]

  integer getCourseId( )

Returns the id of the course which this offering represents.


API Tags:
Return:  Course Id.
Access:  public


[ Top ]
getEnd  [line 160]

  string getEnd( )

Returns the end date of the offering in the form "YYYY-MM-DD".


API Tags:
Return:  Date "YYYY-MM-DD".
Access:  public


[ Top ]
getEnrolledCourseOfferingsHash  [line 274]

  array getEnrolledCourseOfferingsHash( KuoteObjects_User $user  )

Returns a hashed array of the format

  1. $courseOfferingId => $courseOfferingTitle

Parameters:
KuoteObjects_User   $user:  The user for which to get available course offerings.

API Tags:
Return:  Hashed array of $courseOfferingId => $courseOfferingTitle OR boolean False if no offerings are found.
Access:  public


[ Top ]
getId  [line 85]

  integer getId( )

Returns the unique id of the course offering.


API Tags:
Return:  The course offering's unique id
Access:  public


[ Top ]
getPassword  [line 182]

  string getPassword( )

Returns the hash of the course offering's password.


API Tags:
Return:  Date "YYYY-MM-DD". OR boolean False if there is no password.
Access:  public


[ Top ]
getStart  [line 139]

  string getStart( )

Returns the start date of the offering in the form "YYYY-MM-DD".


API Tags:
Return:  Date "YYYY-MM-DD".
Access:  public


[ Top ]
getTitle  [line 117]

  string getTitle( )

Returns the title of the course offering.

The title of the offering should differ from the course offering to distinguish multiple offerings from one another.


API Tags:
Return:  Course title.
Access:  public


[ Top ]
getUserId  [line 223]

  integer getUserId( )

Returns the id of the user which has created this offering.


API Tags:
Return:  User Id.
Access:  public


[ Top ]
hasPassword  [line 94]

  boolean hasPassword( )

Returns true if the offering is password protected, false if not.


API Tags:
Return:  True of password protected, false if not.
Access:  public


[ Top ]
insert  [line 57]

  boolean insert( )

Takes the currently set properties of the offering and inserts them into the data store as a new offering with its own unique id.


API Tags:
Return:  True on success, false otherwise.
Access:  public


[ Top ]
load  [line 296]

  boolean load( $DataObjects_CourseOffering  )

Loads the given DataObjects_CourseOffering object into the private var for such.

Should not be used, violates the independtness of the classes.

Parameters:
DataObjects_CourseOffering   $DataObjects_CourseOffering: 

API Tags:
Return:  True on success, false otherwise.
Access:  public
Deprecated:  


[ Top ]
returnCourseOfferingEnrollmentPasswordForm  [line 309]

  HTML_QuickForm returnCourseOfferingEnrollmentPasswordForm( sting $function  )

Returns an HTML_QuickForm object to request a password for to access a course offering

Should not be used, HTML_Quickform tends to be messy. Makes templating complex. All instances of it should be removed and replaced with static html forms.

Parameters:
sting   $function:  The Kuote Function this form is used for.

API Tags:
Return:  An HTML_QuickForm Object.
Deprecated:  


[ Top ]
setCourseId  [line 214]

  boolean setCourseId( $id $id  )

Sets the id of the course which this offering represents.

Parameters:
$id   $id:  The Course Id.

API Tags:
Return:  True on success, false otherwise.
Access:  public


[ Top ]
setEnd  [line 172]

  boolean setEnd( $dateString $dateString  )

Sets the ending date of an offering.

Date must be passed in the format "YYYY-MM-DD".

Parameters:
$dateString   $dateString:  Date string in the format "YYYY-MM-DD"

API Tags:
Return:  True on success, false otherwise.
Access:  public


[ Top ]
setPassword  [line 194]

  boolean setPassword( $password $password  )

Sets the password of an offering.

Parameters:
$password   $password:  The offering's password.

API Tags:
Return:  True on success, false otherwise.
Access:  public


[ Top ]
setStart  [line 151]

  boolean setStart( $dateString $dateString  )

Sets the starting date of an offering.

Date must be passed in the format "YYYY-MM-DD".

Parameters:
$dateString   $dateString:  Date string in the format "YYYY-MM-DD"

API Tags:
Return:  True on success, false otherwise.
Access:  public


[ Top ]
setTitle  [line 130]

  boolean setTitle( string $title  )

Sets the title of the course offering.

The title of the offering should differ from the course offering to distinguish multiple offerings from one another.

Parameters:
string   $title:  Course Title

API Tags:
Return:  True on success, false otherwise.
Access:  public


[ Top ]
setUserId  [line 233]

  boolean setUserId( integer $id  )

Sets the id of the user which has created this offering.

Parameters:
integer   $id:  User Id.

API Tags:
Return:  True on success, false otherwise.
Access:  public


[ Top ]
update  [line 67]

  boolean update( )

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


[ Top ]
verifyPassword  [line 105]

  boolean verifyPassword( string $password  )

Compares the password of the offering with the passed password.

Returns true on a match, false otherwise.

Parameters:
string   $password: 

API Tags:
Return:  True on match, false otherwise.
Access:  public


[ Top ]

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