|
Moodle
2.2.1
http://www.collinsharper.com
|

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() | |
This class has methods to compute the question statistics from the raw data.
Definition at line 36 of file qstats.php.
| __construct | ( | $ | questions, |
| $ | s, | ||
| $ | summarksavg | ||
| ) |
Constructor.
| $questions | the questions. |
| $s | the number of attempts included in the stats. |
| $summarksavg | the average attempt summarks. |
Definition at line 56 of file qstats.php.

| get_random_guess_score | ( | $ | questiondata | ) | [protected] |
| object | $questiondata |
Reimplemented in testable_quiz_statistics_question_stats.
Definition at line 394 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.
| object | $stats | quetsion stats to update. |
Definition at line 307 of file qstats.php.

| initial_steps_walker | ( | $ | step, |
| $ | stats, | ||
| $ | positionstat = true |
||
| ) | [protected] |
Update $stats->totalmarks, $stats->markarray, $stats->totalothermarks and $stats->othermarksarray to include another state.
| object | $step | the state to add to the statistics. |
| object | $stats | the question statistics we are accumulating. |
| bool | $positionstat | whether this is a statistic of position of question. |
Definition at line 286 of file qstats.php.

| load_step_data | ( | $ | quizid, |
| $ | currentgroup, | ||
| $ | groupstudents, | ||
| $ | allattempts | ||
| ) |
Load the data that will be needed to perform the calculations.
| int | $quizid | the quiz id. |
| int | $currentgroup | the current group. 0 for none. |
| array | $groupstudents | students in this group. |
| bool | $allattempts | use all attempts, or just first attempts. |
Definition at line 99 of file qstats.php.

| make_blank_question_stats | ( | ) | [protected] |
Definition at line 72 of file qstats.php.

| secondary_question_walker | ( | $ | stats | ) | [protected] |
Perform more per-question statistics calculations.
| object | $stats | quetsion stats to update. |
Definition at line 356 of file qstats.php.

| secondary_steps_walker | ( | $ | step, |
| $ | stats | ||
| ) | [protected] |
Now we know the averages, accumulate the date needed to compute the higher moments of the question scores.
| object | $step | the state to add to the statistics. |
| object | $stats | the question statistics we are accumulating. |
| bool | $positionstat | whether this is a statistic of position of question. |
Definition at line 330 of file qstats.php.

$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.