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

Class: KuoteObjects_TestDrive

Source Location: /classes/KuoteObjects/TestDrive.php

Class KuoteObjects_TestDrive

Class Overview

KuoteObjects Quiz

The KuoteObjects_Testing is used for an instructor to try out a quiz without actually creating any data in the datastore. It is a child of KuoteObjects_Quiz, and thus of KuoteObjects_QuestionSet. It's methods supply a way to start a quiz, get questions, answer questions and so forth.

Located in /classes/KuoteObjects/TestDrive.php [line 21]

KuoteObjects_QuestionSet
   |
   --KuoteObjects_Quiz
      |
      --KuoteObjects_TestDrive
Author(s):
  • Kyle Hall
Information Tags:
Copyright:  2006

Methods

[ Top ]
Inherited Properties, Constants, and Methods
Inherited Properties Inherited Methods Inherited Constants

Inherited From KuoteObjects_Quiz

KuoteObjects_Quiz::$currentQuestion
KuoteObjects_Quiz::$currentQuestionAnswered
KuoteObjects_Quiz::$enrollment
KuoteObjects_Quiz::$learning
KuoteObjects_Quiz::$learningOffering
KuoteObjects_Quiz::$learningOfferTaken
KuoteObjects_Quiz::$questionsAnsweredUnused
KuoteObjects_Quiz::$questionsAnsweredUsed
KuoteObjects_Quiz::$questionsUnused
KuoteObjects_Quiz::$questionsUsed
KuoteObjects_Quiz::$result
KuoteObjects_Quiz::$user

Inherited From KuoteObjects_QuestionSet

KuoteObjects_QuestionSet::$questions

Inherited From KuoteObjects_Quiz

KuoteObjects_Quiz::__construct()
Constructor instantiates all the neccessary objects for the quiz to function.
KuoteObjects_Quiz::answerQuestion()
Takes the given option number an 'answers' the question with it.
KuoteObjects_Quiz::fetchResult()
Returns an array where each element of the array is another hashed array of the format:
KuoteObjects_Quiz::getCurrentQuestionBody()
Returns the body of the current question.
KuoteObjects_Quiz::getCurrentQuestionNumber()
Returns the number of the current question.
KuoteObjects_Quiz::getCurrentQuestionOption()
Returns the text of the given question option number
KuoteObjects_Quiz::getQuestion()
Grabs the next question for asking.
KuoteObjects_Quiz::getQuestionsCorrectCount()
Returns the number of correctly answered questions for this quiz.
KuoteObjects_Quiz::getQuestionsCount()
Returns the total number of questions for this quiz.
KuoteObjects_Quiz::getQuestionsIncorrectCount()
Returns the number of incorrectly answered questions for this quiz.
KuoteObjects_Quiz::getTitle()
Returns the title of the learning this quiz is part of.
KuoteObjects_Quiz::isCurrentQuestionOption()
Returns true if there is text for the given option number
KuoteObjects_Quiz::randomize()
Randomizes the order in which the quiz questions are asked.
KuoteObjects_Quiz::sortByDifficulty()
Randomizes the order in which the quiz questions are asked, but only within sets of difficutly.

Inherited From KuoteObjects_QuestionSet

KuoteObjects_QuestionSet::count()
Returns the number of Enrollments in this set.
KuoteObjects_QuestionSet::fetch()
Returns the first Question in the set on the first call.
KuoteObjects_QuestionSet::getByLearningId()
Populates the question set with questions that are part of the given Learning's quiz.
KuoteObjects_QuestionSet::reset()
After calling reset(), fetch() will begin from the beginning of the set again.

[ Top ]
Method Summary
KuoteObjects_TestDrive   __construct()   Constructor instantiates all the neccessary objects for the quiz to function.
boolean   answerQuestion()   Takes the given option number an 'answers' the question with it.

[ Top ]
Methods
Constructor __construct  [line 42]

  KuoteObjects_TestDrive __construct( $user, $learning  )

Constructor instantiates all the neccessary objects for the quiz to function.

Parameters:
   $user: 
   $learning: 

API Tags:
Access:  public


Redefinition of:
KuoteObjects_Quiz::__construct()
Constructor instantiates all the neccessary objects for the quiz to function.

[ Top ]
answerQuestion  [line 69]

  boolean answerQuestion( integer $selectedAnswer  )

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

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.

Redefinition of:
KuoteObjects_Quiz::answerQuestion()
Takes the given option number an 'answers' the question with it.

[ Top ]

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