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

Class: KuoteObjects_Learning

Source Location: /classes/KuoteObjects/Learning.php

Class KuoteObjects_Learning

Class Overview

Implements interfaces:

KuoteObjects Learning

The KuoteObjects Learning represents the combination of a tutorial and a quiz in the system. It must implement the interfaces KuoteInterfaces_Object, and KuoteInterfaces_Learning

Located in /classes/KuoteObjects/Learning.php [line 19]



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

Properties

Methods

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

[ Top ]
Method Summary
static array   getLearningsHash()   Returns a hashed array of learnings that are part of the given course.
KuoteObjects_Learning   __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   getCourseId()   Returns the Id of the Course this Learning is part of.
string   getDescription()   Returns the description of the Learning.
integer   getId()   Returns the unique id of the object
boolean   getQuestionsRandom()   Declares if the questions for this Learning's quiz should be displayed randomly.
boolean   getQuestionsRandomByDifficulty()   Declares if the questions for this Learning's quiz should be displayed randomly, but only randomly within increasing difficuly.
string   getTitle()   Returns the title of the Learning.
string   getTutorialFileName()   Returns the name of the tutorial file for this Learning.
boolean   hasTutorial()   Returns true if this learning has a tutorial, false otherwise.
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_Learning object into the private var for such.
boolean   setCourseId()   Sets the Id of the Course this Learning is part of.
boolean   setDescription()   Sets the description of the Learning
boolean   setQuestionsRandom()   Sets if the questions for this Learning's quiz should be displayed randomly.
boolean   setQuestionsRandomByDifficulty()   Sets if the questions for this Learning's quiz should be displayed randomly by difficutly.
boolean   setTitle()   Sets the title of the Learning
boolean   setTutorialFileName()   Sets the name of the tutorial file for this Learning.
boolean   update()   Updates the datastore to reflect the currently set properties of the object.

[ Top ]
Properties
mixed   $learning [line 24]

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

API Tags:
Access:  protected


[ Top ]
Methods
static method getLearningsHash  [line 237]

  static array getLearningsHash( integer $courseId  )

Returns a hashed array of learnings that are part of the given course.

Returns a hashed array of the format

  1. $learningId => $learningTitle

Parameters:
integer   $courseId:  Id of the course for which to find created learnings.

API Tags:
Return:  Hashed array of
  1. $learningId => $learningTitle
. OR boolean False if no learnings are found of the given Course Id.
Access:  public


[ Top ]
Constructor __construct  [line 30]

  KuoteObjects_Learning __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 69]

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

  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 ]
getCourseId  [line 213]

  integer getCourseId( )

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


API Tags:
Return:  Course Id.
Access:  public


[ Top ]
getDescription  [line 127]

  string getDescription( )

Returns the description of the Learning.


API Tags:
Return:  Learning description.
Access:  public


[ Top ]
getId  [line 78]

  integer getId( )

Returns the unique id of the object


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


[ Top ]
getQuestionsRandom  [line 168]

  boolean getQuestionsRandom( )

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


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


[ Top ]
getQuestionsRandomByDifficulty  [line 191]

  boolean getQuestionsRandomByDifficulty( )

Declares if the questions for this Learning'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.


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


[ Top ]
getTitle  [line 108]

  string getTitle( )

Returns the title of the Learning.


API Tags:
Return:  Learning title.
Access:  public


[ Top ]
getTutorialFileName  [line 149]

  string getTutorialFileName( )

Returns the name of the tutorial file for this Learning.

All tutorial all stored under LEARNINGS_ROOT/CourseId/LearningId/TutorialFileName If the tutorial consists of multiple files, the TutorialFileName will be the first page.


API Tags:
Return:  Tutorial filename.
Access:  public


[ Top ]
hasTutorial  [line 99]

  boolean hasTutorial( )

Returns true if this learning has a tutorial, false otherwise.


API Tags:
Return:  True if tutorial exists, false otherwise.
Access:  public


[ Top ]
insert  [line 50]

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

  boolean load( DataObjects_Learning $DataObjects_Learning  )

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

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

Parameters:
DataObjects_Learning   $DataObjects_Learning: 

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


[ Top ]
setCourseId  [line 223]

  boolean setCourseId( integer $id  )

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

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

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


[ Top ]
setDescription  [line 137]

  boolean setDescription( string $description  )

Sets the description of the Learning

Parameters:
string   $description:  The description of the Learning.

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


[ Top ]
setQuestionsRandom  [line 178]

  boolean setQuestionsRandom( boolean $bool  )

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

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

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


[ Top ]
setQuestionsRandomByDifficulty  [line 204]

  boolean setQuestionsRandomByDifficulty( boolean $bool  )

Sets if the questions for this Learning'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.

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

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


[ Top ]
setTitle  [line 118]

  boolean setTitle( string $title  )

Sets the title of the Learning

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

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


[ Top ]
setTutorialFileName  [line 159]

  boolean setTutorialFileName( string $name  )

Sets the name of the tutorial file for this Learning.

Parameters:
string   $name:  The name of the tutorial file for this Learning.

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


[ Top ]
update  [line 60]

  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:02 -0500 by phpDocumentor 1.3.0