Moodle  2.2.1
http://www.collinsharper.com
quiz_statistics_response_analyser Class Reference

Public Member Functions

 __construct ($questiondata)
 has_subparts ()
 has_response_classes ()
 has_actual_responses ()
 analyse ($qubaids)
 load_cached ($quizstatisticsid)
 store_cached ($quizstatisticsid)

Data Fields

 $responses = array()
 $responseclasses = array()

Protected Member Functions

 add_data_from_one_attempt (question_attempt $qa)

Protected Attributes

 $questiondata
 $loaded = false

Detailed Description

This class can store and compute the analysis of the responses to a particular question.

Definition at line 38 of file responseanalysis.php.


Constructor & Destructor Documentation

__construct ( questiondata)

Create a new instance of this class for holding/computing the statistics for a particular question.

Parameters:
object$questiondatathe data from the database defining this question.

Definition at line 66 of file responseanalysis.php.

Here is the call graph for this function:


Member Function Documentation

Analyse the data from one question attempt.

Parameters:
question_attempt$qathe data to analyse.

Definition at line 142 of file responseanalysis.php.

Here is the call graph for this function:

Here is the caller graph for this function:

analyse ( qubaids)

Analyse all the response data for for all the specified attempts at this question.

Parameters:
$qubaidswhich attempts to consider.

Definition at line 125 of file responseanalysis.php.

Here is the call graph for this function:

Returns:
bool whether this analysis has a response class more than one different acutal response, or if the actual response is different from the model response.

Definition at line 104 of file responseanalysis.php.

Here is the caller graph for this function:

Returns:
bool whether this analysis has (a subpart with) more than one response class.

Definition at line 90 of file responseanalysis.php.

Here is the caller graph for this function:

Returns:
bool whether this analysis has more than one subpart.

Definition at line 82 of file responseanalysis.php.

Here is the caller graph for this function:

load_cached ( quizstatisticsid)

Store the computed response analysis in the quiz_question_response_stats table.

Parameters:
int$quizstatisticsidthe cached quiz statistics to load the data corresponding to.
Returns:
bool true if cached data was found in the database and loaded, otherwise false, to mean no data was loaded.

Definition at line 175 of file responseanalysis.php.

store_cached ( quizstatisticsid)

Store the computed response analysis in the quiz_question_response_stats table.

Parameters:
int$quizstatisticsidthe cached quiz statistics this correspons to.

Definition at line 198 of file responseanalysis.php.


Field Documentation

$loaded = false [protected]

Definition at line 41 of file responseanalysis.php.

$questiondata [protected]

Definition at line 40 of file responseanalysis.php.

$responseclasses = array()

Definition at line 59 of file responseanalysis.php.

Definition at line 53 of file responseanalysis.php.


The documentation for this class was generated from the following file:
 All Data Structures Namespaces Files Functions Variables Enumerations