Skip to content

Commit

Permalink
MDL-41756 (3) quiz statistics : test variant stats
Browse files Browse the repository at this point in the history
  • Loading branch information
jamiepratt committed Jan 27, 2014
1 parent 1239d28 commit 4f7516f
Showing 1 changed file with 31 additions and 0 deletions.
Expand Up @@ -148,6 +148,37 @@ public function test_walkthrough_from_csv($quizsettings, $csvdata) {
foreach ($itemstats as $statname => $expected) {
$this->assert_stat_equals($questionstats, $subquestionstats, 1, null, 'numerical', $statname, $expected);
}



// These variant's stats are calculated in stats_for_variant_1.xls and stats_for_variant_8.xls
// The calculations in the spreadsheets are the same but applied just to the attempts where the variants appeared.

$statsforslot2variants = array(1 => array('s' => 6,
'effectiveweight' => null,
'discriminationindex' => -10.5999788,
'discriminativeefficiency' => -14.28571429,
'sd' => 0.5477225575,
'facility' => 0.50,
'maxmark' => 1,
'variant' => 1,
'slot' => 2,
'subquestion' => false),
8 => array('s' => 5,
'effectiveweight' => null,
'discriminationindex' => -57.77466679,
'discriminativeefficiency' => -71.05263241,
'sd' => 0.547722558,
'facility' => 0.40,
'maxmark' => 1,
'variant' => 8,
'slot' => 2,
'subquestion' => false));
foreach ($statsforslot2variants as $variant => $stats) {
foreach ($stats as $statname => $expected) {
$this->assert_stat_equals($questionstats, $subquestionstats, 2, $variant, null, $statname, $expected);
}
}
}

/**
Expand Down

0 comments on commit 4f7516f

Please sign in to comment.