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

Class: KuoteObjects_ResultSet

Source Location: /classes/KuoteObjects/ResultSet.php

Class KuoteObjects_ResultSet

Class Overview

Implements interfaces:

KuoteObjects ResultSet

The KuoteObjects ResultSet represents a collection of Result objects in the Kuote system. It must implement the interfaces KuoteInterfaces_ObjectSet, and KuoteInterfaces_ResultSet.

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



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

Properties

Methods

[ Top ]
Property Summary
mixed   $results   Array to hold Result objects

[ Top ]
Method Summary
integer   count()   Returns the number of Enrollments in this set.
KuoteObjects_Resul   fetch()   Returns the first Result in the set on the first call.
float   getAverage()   Returns the average grade of all results as a percent.
integer   getByCourseId()   Populates the ResultSet with all Results pertaining to the given course.
integer   getByCourseOfferingId()   Populates the ResultSet with all Results pertaining to the given course offering.
integer   getByLearningId()   Populates the ResultSet with all Results pertaining to the given learning quiz.
integer   getByLearningOfferingId()   Populates the ResultSet with all Results pertaining to the given learning offering's quiz.
integer   getByUserIdAndCourseOfferingId()   Populates the ResultSet with all Results pertaining to the given user and course offering.
boolean   reset()   After calling reset(), fetch() will begin from the beginning of the set again.

[ Top ]
Properties
mixed   $results = array() [line 26]

Array to hold Result objects

API Tags:
Access:  protected


[ Top ]
Methods
count  [line 65]

  integer count( )

Returns the number of Enrollments in this set.


API Tags:
Return:  Number of Enrollments currently in this set.
Access:  public


[ Top ]
fetch  [line 38]

  KuoteObjects_Resul fetch( )

Returns the first Result in the set on the first call.

The next Result in the set on each successive call.

Example:

  1.  while $question $questionSet->fetch(doSomething()}


API Tags:
Return:  A Result object. OR boolean False if there are no more Results in the set.
Access:  public


[ Top ]
getAverage  [line 179]

  float getAverage( )

Returns the average grade of all results as a percent.


API Tags:
Return:  Grade average.
Access:  public


[ Top ]
getByCourseId  [line 118]

  integer getByCourseId( integer $id  )

Populates the ResultSet with all Results pertaining to the given course.

Parameters:
integer   $id:  The Id of the Course whose results we are to find.

API Tags:
Return:  Number of questions found
Access:  public


[ Top ]
getByCourseOfferingId  [line 138]

  integer getByCourseOfferingId( integer $id  )

Populates the ResultSet with all Results pertaining to the given course offering.

Parameters:
integer   $id:  The Id of the CourseOffering whose results we are to find.

API Tags:
Return:  Number of questions found
Access:  public


[ Top ]
getByLearningId  [line 75]

  integer getByLearningId( integer $id  )

Populates the ResultSet with all Results pertaining to the given learning quiz.

Parameters:
integer   $id:  The Id of the Learning whose questions to find.

API Tags:
Return:  Number of results found
Access:  public


[ Top ]
getByLearningOfferingId  [line 96]

  integer getByLearningOfferingId( integer $id  )

Populates the ResultSet with all Results pertaining to the given learning offering's quiz.

Parameters:
integer   $id:  The Id of the Learning Offering whose results we are to find.

API Tags:
Return:  Number of results found
Access:  public


[ Top ]
getByUserIdAndCourseOfferingId  [line 159]

  integer getByUserIdAndCourseOfferingId( integer $userId, integer $courseOfferingId  )

Populates the ResultSet with all Results pertaining to the given user and course offering.

Parameters:
integer   $userId:  The Id of the User whose results we are to find.
integer   $courseOfferingId:  The Id of the Course Offering whose results we are to find.

API Tags:
Return:  Number of questions found
Access:  public


[ Top ]
reset  [line 56]

  boolean reset( )

After calling reset(), fetch() will begin from the beginning of the set again.


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


[ Top ]

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