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

Interface: KuoteInterfaces_Question

Source Location: /classes/KuoteInterfaces/Question.php

Interface KuoteInterfaces_Question

Interface Overview

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

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



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

Methods

[ Top ]
Method Summary
static integer   getNextQuestionNumber()   Returns the question number that should be used for a new question for the given learning.
integer   getAnswer()   Returns the option number of the correct question option.
string   getBody()   Returns the "question" for this question.
integer   getDifficulty()   Returns the difficulty of the question. 1 is easiest, 5 is hardest.
integer   getLearningId()   Returns the Id of the learning under which this question exists.
string   getOption()   Returns the "answer" for the given Option Number
string   getOption1()   Returns the text of the questions first option.
string   getOption2()   Returns the text of the questions second option.
string   getOption3()   Returns the text of the questions third option.
string   getOption4()   Returns the text of the questions fourth option.
string   getOption5()   Returns the text of the questions fifth option.
integer   getQuestionNumber()   Returns the order number of the question. First question is 1, second question is 2, etc.
integer   getTime()   Returns the amount of time given in seconds to answer this question. 0 is unlimited.
boolean   setAnswer()   Sets the option number of the correct question option.
boolean   setBody()   Sets the "question" for this question.
boolean   setDifficulty()   Sets the difficulty of the question. 1 is easiest, 5 is hardest.
boolean   setLearningId()   Sets the Id of the learning under which this question exists.
boolean   setOption()   Sets the "answer" for the given option number to the given string.
boolean   setOption1()   Sets the text of the questions first option.
boolean   setOption2()   Sets the text of the questions second option.
boolean   setOption3()   Sets the text of the questions third option.
boolean   setOption4()   Sets the text of the questions forth option.
boolean   setOption5()   Sets the text of the questions fifth option.
boolean   setQuestionNumber()   Sets the order number of the question. First question is 1, second question is 2, etc.
boolean   setTime()   Sets the amount of time given in seconds to answer this question. 0 is unlimited.

[ Top ]
Methods
static method getNextQuestionNumber  [line 210]

  static integer getNextQuestionNumber( integer $learningId  )

Returns the question number that should be used for a new question for the given learning.

i.e. If there are five question, getNextQuestionNumber() will return an integer 6.

Parameters:
integer   $learningId:  Learning Id

API Tags:
Return:  Question Number
Access:  public


[ Top ]
getAnswer  [line 73]

  integer getAnswer( )

Returns the option number of the correct question option.


API Tags:
Return:  Option number.
Access:  public


[ Top ]
getBody  [line 43]

  string getBody( )

Returns the "question" for this question.


API Tags:
Return:  Question Body.
Access:  public


[ Top ]
getDifficulty  [line 118]

  integer getDifficulty( )

Returns the difficulty of the question. 1 is easiest, 5 is hardest.


API Tags:
Return:  Question Difficulty
Access:  public


[ Top ]
getLearningId  [line 88]

  integer getLearningId( )

Returns the Id of the learning under which this question exists.


API Tags:
Return:  Learning Id
Access:  public


[ Top ]
getOption  [line 26]

  string getOption( integer $optionNumber  )

Returns the "answer" for the given Option Number

Parameters:
integer   $optionNumber:  The number of the option to return, 1 through 5 are valid.

API Tags:
Return:  The "answer" for the given Option Number.
Access:  public

Information Tags:
Throws:  Exception 1 if $optionNumber is out of bounds.

[ Top ]
getOption1  [line 133]

  string getOption1( )

Returns the text of the questions first option.


API Tags:
Return:  Question Option
Access:  public


[ Top ]
getOption2  [line 148]

  string getOption2( )

Returns the text of the questions second option.


API Tags:
Return:  Question Option
Access:  public


[ Top ]
getOption3  [line 163]

  string getOption3( )

Returns the text of the questions third option.


API Tags:
Return:  Question Option
Access:  public


[ Top ]
getOption4  [line 178]

  string getOption4( )

Returns the text of the questions fourth option.


API Tags:
Return:  Question Option
Access:  public


[ Top ]
getOption5  [line 193]

  string getOption5( )

Returns the text of the questions fifth option.


API Tags:
Return:  Question Option
Access:  public


[ Top ]
getQuestionNumber  [line 103]

  integer getQuestionNumber( )

Returns the order number of the question. First question is 1, second question is 2, etc.


API Tags:
Return:  Question Number
Access:  public


[ Top ]
getTime  [line 58]

  integer getTime( )

Returns the amount of time given in seconds to answer this question. 0 is unlimited.


API Tags:
Return:  Time in seconds.
Access:  public


[ Top ]
setAnswer  [line 81]

  boolean setAnswer( integer $answer  )

Sets the option number of the correct question option.

Parameters:
integer   $answer:  Correct Option Number

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


[ Top ]
setBody  [line 51]

  boolean setBody( string $body  )

Sets the "question" for this question.

Parameters:
string   $body:  Question Body.

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


[ Top ]
setDifficulty  [line 126]

  boolean setDifficulty( $difficulty, integer $difficutly  )

Sets the difficulty of the question. 1 is easiest, 5 is hardest.

Parameters:
integer   $difficutly:  Question Difficutly
   $difficulty: 

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


[ Top ]
setLearningId  [line 96]

  boolean setLearningId( integer $id  )

Sets the Id of the learning under which this question exists.

Parameters:
integer   $id:  Learning Id

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


[ Top ]
setOption  [line 36]

  boolean setOption( integer $optionNumber, string $string  )

Sets the "answer" for the given option number to the given string.

Parameters:
integer   $optionNumber:  The number of the option to set, 1 through 5 are valid.
string   $string:  The string which is to be the "answer".

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

Information Tags:
Throws:  Exception 1 if optionNumber is out of bounds.

[ Top ]
setOption1  [line 141]

  boolean setOption1( string $string  )

Sets the text of the questions first option.

Parameters:
string   $string:  Question Option

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


[ Top ]
setOption2  [line 156]

  boolean setOption2( string $string  )

Sets the text of the questions second option.

Parameters:
string   $string:  Question Option

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


[ Top ]
setOption3  [line 171]

  boolean setOption3( string $string  )

Sets the text of the questions third option.

Parameters:
string   $string:  Question Option

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


[ Top ]
setOption4  [line 186]

  boolean setOption4( string $string  )

Sets the text of the questions forth option.

Parameters:
string   $string:  Question Option

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


[ Top ]
setOption5  [line 201]

  boolean setOption5( string $string  )

Sets the text of the questions fifth option.

Parameters:
string   $string:  Question Option

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


[ Top ]
setQuestionNumber  [line 111]

  boolean setQuestionNumber( $number, integer $id  )

Sets the order number of the question. First question is 1, second question is 2, etc.

Parameters:
integer   $id:  Learning Id
   $number: 

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


[ Top ]
setTime  [line 66]

  boolean setTime( integer $time  )

Sets the amount of time given in seconds to answer this question. 0 is unlimited.

Parameters:
integer   $time:  Time in seconds.

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


[ Top ]

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