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

Class: KuoteObjects_QuestionAnswered

Source Location: /classes/KuoteObjects/QuestionAnswered.php

Class KuoteObjects_QuestionAnswered

Class Overview

Implements interfaces:

KuoteObjects QuestionAnswered

The KuoteObjects QuestionAnswered represents a student having answered a question as part of quiz in the Kuote system. It must implement the interfaces KuoteInterfaces_Object, and KuoteInterfaces_QuestionAnswered

Located in /classes/KuoteObjects/QuestionAnswered.php [line 20]



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

Methods

[ Top ]
Method Summary
KuoteObjects_QuestionAnswered   __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   getChoice()   Returns the selected choice of the questions answer options
integer   getId()   Returns the unique id of the object
boolean   getIsCorrect()   Returns true if the selected answer is correct.
integer   getLearningOfferTakenId()   Returns the Id of the LearningOfferTaken for the quiz of the question this QuestionAnswered is answering.
integer   getQuestionId()   Returns the Id of the Question this QuestionAnswered is answering.
boolean   initialize()   Creates a new QuestionAnswered in the datastore based on the given Question Id and LearningOfferTaken Id.
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   setChoice()   Sets the selected choice of the questions answer options
boolean   setIsCorrect()   Sets whether the selected answer is correct or not.
boolean   setLearningOfferTakenId()   Sets the Id of the LearningOfferTaken for the quiz of the question
boolean   setQuestionId()   Sets the Id of the Question this QuestionAnswered is answering.
boolean   update()   Updates the datastore to reflect the currently set properties of the object.

[ Top ]
Methods
Constructor __construct  [line 32]

  KuoteObjects_QuestionAnswered __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 71]

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

  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 ]
getChoice  [line 104]

  integer getChoice( )

Returns the selected choice of the questions answer options


API Tags:
Return:  Question Option.
Access:  public


[ Top ]
getId  [line 80]

  integer getId( )

Returns the unique id of the object


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


[ Top ]
getIsCorrect  [line 123]

  boolean getIsCorrect( )

Returns true if the selected answer is correct.


API Tags:
Return:  True if selected answer is correct, false otherwise.
Access:  public


[ Top ]
getLearningOfferTakenId  [line 162]

  integer getLearningOfferTakenId( )

Returns the Id of the LearningOfferTaken for the quiz of the question this QuestionAnswered is answering.


API Tags:
Return:  LearningOfferTaken Id
Access:  public


[ Top ]
getQuestionId  [line 142]

  integer getQuestionId( )

Returns the Id of the Question this QuestionAnswered is answering.


API Tags:
Return:  Question Id
Access:  public


[ Top ]
initialize  [line 92]

  boolean initialize( KuoteObjects_Question $question, KuoteObjects_LearningOfferTaken $learningOfferTaken  )

Creates a new QuestionAnswered in the datastore based on the given Question Id and LearningOfferTaken Id.

Parameters:
KuoteObjects_Question   $question:  The Question being answered.
KuoteObjects_LearningOfferTaken   $learningOfferTaken:  The LearningOfferTaken for this quiz.

API Tags:
Return:  True if created successfully, false otherwise.
Access:  public


[ Top ]
insert  [line 52]

  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 ]
setChoice  [line 114]

  boolean setChoice( integer $choice  )

Sets the selected choice of the questions answer options

Parameters:
integer   $choice:  Question Option.

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


[ Top ]
setIsCorrect  [line 133]

  boolean setIsCorrect( boolean $bool  )

Sets whether the selected answer is correct or not.

Parameters:
boolean   $bool:  True if correct, otherwise False

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


[ Top ]
setLearningOfferTakenId  [line 172]

  boolean setLearningOfferTakenId( integer $id  )

Sets the Id of the LearningOfferTaken for the quiz of the question

Parameters:
integer   $id:  LearningOfferTaken Id

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


[ Top ]
setQuestionId  [line 152]

  boolean setQuestionId( integer $id  )

Sets the Id of the Question this QuestionAnswered is answering.

Parameters:
integer   $id:  Question Id

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


[ Top ]
update  [line 62]

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