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

Class: KuoteObjects_LearningOffering

Source Location: /classes/KuoteObjects/LearningOffering.php

Class KuoteObjects_LearningOffering

Class Overview

Implements interfaces:

KuoteObjects LearningOffering

The KuoteObjects LearningOffering represents an offering (to make a course available to take) of a learning under a Course Offering in the Kuote system. It must implement the interfaces KuoteInterfaces_Object, and KuoteInterfaces_LearningOffering.

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/LearningOffering.php [line 24]



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

Properties

Methods

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

[ Top ]
Method Summary
static array   getLearningOfferingsHash()   Returns a hashed array of learnings offerings for the given Learning Id.
KuoteObjects_LearningOffering   __construct()   Constructor instantiates $enrollment as a DataObjects_Enrollment object.
boolean   delete()   Removes the object from the datastore based on it's Id
boolean   get()   Loads the object from the data store by its unique identifier.
integer   getCourseOfferingId()   Returns the Id of the Course Offering this Learning Offering is part of.
string   getEnd()   Returns the end date of the offering in the form "YYYY-MM-DD".
integer   getId()   Returns the unique id of the object
integer   getLearningId()   Returns the Id of the Learning this Learning Offering is offering.
boolean   getQuestionsRandom()   Declares if the questions for this Learning Offering's quiz should be displayed randomly.
boolean   getQuestionsRandomByDifficulty()   Declares if the questions for this Learning Offering's quiz should be displayed randomly, but only randomly within increasing difficuly.
string   getStart()   Returns the start date of the offering in the form "YYYY-MM-DD".
string   getTitle()   Returns the title of the Learning Offering.
boolean   insert()   Takes the currently set properties of the object and inserts them into the data store as a new instance with its own unique id.
boolean   load()   Loads the given DataObjects_LearningOffering object into the private var for such.
boolean   setCourseOfferingId()   Sets the Id of the Course Offering this Learning Offering is part of.
boolean   setEnd()   Sets the ending date of an offering.
boolean   setLearningId()   Sets the Id of the Learning this Learning Offering is offering.
boolean   setQuestionsRandom()   Sets if the questions for this Learning Offering's quiz should be displayed randomly.
boolean   setQuestionsRandomByDifficulty()   Sets if the questions for this Learning Offering's quiz should be displayed randomly by difficutly.
boolean   setStart()   Sets the starting date of an offering.
boolean   setTitle()   Sets the title of the Learning Offering
boolean   update()   Updates the datastore to reflect the currently set properties of the object.

[ Top ]
Properties
mixed   $learningOffering [line 30]

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

API Tags:
Access:  protected


[ Top ]
Methods
static method getLearningOfferingsHash  [line 249]

  static array getLearningOfferingsHash( integer $learningId  )

Returns a hashed array of learnings offerings for the given Learning Id.

Returns a hashed array of the format

  1. $id => $title

Parameters:
integer   $learningId:  Learning for which to find offerings.

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


[ Top ]
Constructor __construct  [line 36]

  KuoteObjects_LearningOffering __construct( )

Constructor instantiates $enrollment as a DataObjects_Enrollment object.


API Tags:
Access:  public

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

[ Top ]
delete  [line 75]

  boolean delete( )

Removes the object from the datastore based on it's Id


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


[ Top ]
get  [line 46]

  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


[ Top ]
getCourseOfferingId  [line 206]

  integer getCourseOfferingId( )

Returns the Id of the Course Offering this Learning Offering is part of.


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


[ Top ]
getEnd  [line 133]

  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 ]
getId  [line 84]

  integer getId( )

Returns the unique id of the object


API Tags:
Return:  The objects's unique id
Access:  public


[ Top ]
getLearningId  [line 225]

  integer getLearningId( )

Returns the Id of the Learning this Learning Offering is offering.


API Tags:
Return:  Learning Id.
Access:  public


[ Top ]
getQuestionsRandom  [line 156]

  boolean getQuestionsRandom( )

Declares if the questions for this Learning Offering's quiz should be displayed randomly.

This setting takes precedence over the Learning's same property.


API Tags:
Return:  True if questions should be random, false otherwise.
Access:  public


[ Top ]
getQuestionsRandomByDifficulty  [line 182]

  boolean getQuestionsRandomByDifficulty( )

Declares if the questions for this Learning Offering's quiz should be displayed randomly, but only randomly within increasing difficuly.

If true, first ask all difficutly 1 questions randomly, then difficutly 2 questions randomly, and so on in that fashion. This setting takes precedence over the Learning's same property.


API Tags:
Return:  True if questions should be random by difficutly, false otherwise.
Access:  public


[ Top ]
getStart  [line 112]

  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 93]

  string getTitle( )

Returns the title of the Learning Offering.


API Tags:
Return:  Learning Offering title.
Access:  public


[ Top ]
insert  [line 56]

  boolean insert( )

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


[ Top ]
load  [line 276]

  boolean load( $dataObjects_LearningOffering, DataObjects_LearningOffering $DataObjects_LearningOffering  )

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

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

Parameters:
DataObjects_LearningOffering   $DataObjects_LearningOffering: 
DataObjects_LearningOffering   $dataObjects_LearningOffering: 

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


[ Top ]
setCourseOfferingId  [line 216]

  boolean setCourseOfferingId( integer $id  )

Sets the Id of the Course Offering this Learning Offering is part of.

Parameters:
integer   $id:  The id of the Course Offering this Learning is part of.

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


[ Top ]
setEnd  [line 145]

  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 ]
setLearningId  [line 235]

  boolean setLearningId( integer $id  )

Sets the Id of the Learning this Learning Offering is offering.

Parameters:
integer   $id:  The id of the Learning this Learning Offering is offering.

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


[ Top ]
setQuestionsRandom  [line 168]

  boolean setQuestionsRandom( boolean $bool  )

Sets if the questions for this Learning Offering's quiz should be displayed randomly.

This setting takes precedence over the Learning's same property.

Parameters:
boolean   $bool:  True if they should be random, false otherwise.

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


[ Top ]
setQuestionsRandomByDifficulty  [line 197]

  boolean setQuestionsRandomByDifficulty( boolean $bool  )

Sets if the questions for this Learning Offering's quiz should be displayed randomly by difficutly.

If true, first ask all difficutly 1 questions randomly, then difficutly 2 questions randomly, and so on in that fashion. This setting takes precedence over the Learning's same property.

Parameters:
boolean   $bool:  True if they should be random by difficulty, false otherwise.

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


[ Top ]
setStart  [line 124]

  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 103]

  boolean setTitle( string $title  )

Sets the title of the Learning Offering

Parameters:
string   $title:  The title of the Learning Offering.

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


[ Top ]
update  [line 66]

  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 ]

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