Moodle  2.2.1
http://www.collinsharper.com
quiz_statistics_question_stats Class Reference
Inheritance diagram for quiz_statistics_question_stats:

Public Member Functions

 __construct ($questions, $s, $summarksavg)
 load_step_data ($quizid, $currentgroup, $groupstudents, $allattempts)
 compute_statistics ()
 get_sum_of_mark_variance ()

Data Fields

 $questions
 $subquestions = array()

Protected Member Functions

 make_blank_question_stats ()
 initial_steps_walker ($step, $stats, $positionstat=true)
 initial_question_walker ($stats)
 secondary_steps_walker ($step, $stats)
 secondary_question_walker ($stats)
 get_random_guess_score ($questiondata)

Protected Attributes

 $s
 $summarksavg
 $allattempts
 $lateststeps
 $sumofmarkvariance = 0
 $randomselectors = array()

Detailed Description

This class has methods to compute the question statistics from the raw data.

Definition at line 36 of file qstats.php.


Constructor & Destructor Documentation

__construct ( questions,
s,
summarksavg 
)

Constructor.

Parameters:
$questionsthe questions.
$sthe number of attempts included in the stats.
$summarksavgthe average attempt summarks.

Definition at line 56 of file qstats.php.

Here is the call graph for this function:


Member Function Documentation

Definition at line 132 of file qstats.php.

Here is the call graph for this function:

get_random_guess_score ( questiondata) [protected]
Parameters:
object$questiondata
Returns:
number the random guess score for this question.

Reimplemented in testable_quiz_statistics_question_stats.

Definition at line 394 of file qstats.php.

Here is the call graph for this function:

Here is the caller graph for this function:

Used when computing CIC.

Returns:
number

Definition at line 403 of file qstats.php.

initial_question_walker ( stats) [protected]

Perform some computations on the per-question statistics calculations after we have been through all the states.

Parameters:
object$statsquetsion stats to update.

Definition at line 307 of file qstats.php.

Here is the caller graph for this function:

initial_steps_walker ( step,
stats,
positionstat = true 
) [protected]

Update $stats->totalmarks, $stats->markarray, $stats->totalothermarks and $stats->othermarksarray to include another state.

Parameters:
object$stepthe state to add to the statistics.
object$statsthe question statistics we are accumulating.
bool$positionstatwhether this is a statistic of position of question.

Definition at line 286 of file qstats.php.

Here is the caller graph for this function:

load_step_data ( quizid,
currentgroup,
groupstudents,
allattempts 
)

Load the data that will be needed to perform the calculations.

Parameters:
int$quizidthe quiz id.
int$currentgroupthe current group. 0 for none.
array$groupstudentsstudents in this group.
bool$allattemptsuse all attempts, or just first attempts.

Definition at line 99 of file qstats.php.

Here is the call graph for this function:

make_blank_question_stats ( ) [protected]
Returns:
object ready to hold all the question statistics.

Definition at line 72 of file qstats.php.

Here is the caller graph for this function:

secondary_question_walker ( stats) [protected]

Perform more per-question statistics calculations.

Parameters:
object$statsquetsion stats to update.

Definition at line 356 of file qstats.php.

Here is the caller graph for this function:

secondary_steps_walker ( step,
stats 
) [protected]

Now we know the averages, accumulate the date needed to compute the higher moments of the question scores.

Parameters:
object$stepthe state to add to the statistics.
object$statsthe question statistics we are accumulating.
bool$positionstatwhether this is a statistic of position of question.

Definition at line 330 of file qstats.php.

Here is the caller graph for this function:


Field Documentation

$allattempts [protected]

Definition at line 42 of file qstats.php.

$lateststeps [protected]

Definition at line 45 of file qstats.php.

Definition at line 37 of file qstats.php.

$randomselectors = array() [protected]

Definition at line 48 of file qstats.php.

$s [protected]

Definition at line 40 of file qstats.php.

$subquestions = array()

Definition at line 38 of file qstats.php.

$summarksavg [protected]

Definition at line 41 of file qstats.php.

$sumofmarkvariance = 0 [protected]

Definition at line 47 of file qstats.php.


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