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

Interface: KuoteInterfaces_Quiz

Source Location: /classes/KuoteInterfaces/Quiz.php

Interface KuoteInterfaces_Quiz

Interface Overview

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

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



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

Methods

[ Top ]
Method Summary
boolean   answerQuestion()   Takes the given option number an 'answers' the question with it.
integer   fetchResult()   Returns an array where each element of the array is another hashed array of the format:
string   getCurrentQuestionBody()   Returns the body of the current question.
integer   getCurrentQuestionNumber()   Returns the number of the current question.
string   getCurrentQuestionOption()   Returns the text of the given question option number
$bool   getQuestion()   Grabs the next question for asking.
integer   getQuestionsCorrectCount()   Returns the number of correctly answered questions for this quiz.
integer   getQuestionsCount()   Returns the total number of questions for this quiz.
integer   getQuestionsIncorrectCount()   Returns the number of incorrectly answered questions for this quiz.
string   getTitle()   Returns the title of the learning this quiz is part of.
boolean   isCurrentQuestionOption()   Returns true if there is text for the given option number
boolean   randomize()   Randomizes the order in which the quiz questions are asked.
boolean   sortByDifficulty()   Randomizes the order in which the quiz questions are asked, but only within sets of difficutly.

[ Top ]
Methods
answerQuestion  [line 56]

  boolean answerQuestion( integer $selectedAnswer  )

Takes the given option number an 'answers' the question with it.

The QuestionAnswered for the question is updated in the datastore.

Parameters:
integer   $selectedAnswer:  Selected Question Option.

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

Information Tags:
Throws:  Exception 2 if there is no current question.

[ Top ]
fetchResult  [line 107]

  integer fetchResult( )

Returns an array where each element of the array is another hashed array of the format:

  1.  array "question" => KuoteObjects_Question Object,
  2.  "questionAnswered" => KuoteObjects_QuestionAnswered }


API Tags:
Return:  Correct Questions Count
Access:  public


[ Top ]
getCurrentQuestionBody  [line 32]

  string getCurrentQuestionBody( )

Returns the body of the current question.


API Tags:
Return:  Question Body
Access:  public

Information Tags:
Throws:  Exception 2 if there is no current question.

[ Top ]
getCurrentQuestionNumber  [line 75]

  integer getCurrentQuestionNumber( )

Returns the number of the current question.

That is, if 2 questions have been asked and answered, getCurrentQuestion() will return 3.


API Tags:
Return:  Question Number.
Access:  public


[ Top ]
getCurrentQuestionOption  [line 40]

  string getCurrentQuestionOption( integer $optionNumber  )

Returns the text of the given question option number

Parameters:
integer   $optionNumber:  Option Number

API Tags:
Return:  Option Text
Access:  public

Information Tags:
Throws:  Exception 2 if there is no current question.

[ Top ]
getQuestion  [line 25]

  $bool getQuestion( )

Grabs the next question for asking.


API Tags:
Return:  True if successful
Access:  public

Information Tags:
Throws:  Exception 3 if there are no more questions.
Throws:  Exception 1 if the current quesiton has not been answered yet.

[ Top ]
getQuestionsCorrectCount  [line 87]

  integer getQuestionsCorrectCount( )

Returns the number of correctly answered questions for this quiz.


API Tags:
Return:  Correct Questions Count
Access:  public


[ Top ]
getQuestionsCount  [line 81]

  integer getQuestionsCount( )

Returns the total number of questions for this quiz.


API Tags:
Return:  Questions Count
Access:  public


[ Top ]
getQuestionsIncorrectCount  [line 93]

  integer getQuestionsIncorrectCount( )

Returns the number of incorrectly answered questions for this quiz.


API Tags:
Return:  Incorrect Questions Count
Access:  public


[ Top ]
getTitle  [line 99]

  string getTitle( )

Returns the title of the learning this quiz is part of.


API Tags:
Return:  Learning Title
Access:  public


[ Top ]
isCurrentQuestionOption  [line 47]

  boolean isCurrentQuestionOption( $optionNumber  )

Returns true if there is text for the given option number

Parameters:
   $optionNumber: 

API Tags:
Return:  True if option is set, false otherwise.
Access:  public

Information Tags:
Throws:  Exception 2 if there is no current question.

[ Top ]
randomize  [line 62]

  boolean randomize( )

Randomizes the order in which the quiz questions are asked.


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


[ Top ]
sortByDifficulty  [line 68]

  boolean sortByDifficulty( )

Randomizes the order in which the quiz questions are asked, but only within sets of difficutly.


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


[ Top ]

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