Skip to content

Commit

Permalink
MDL-17190 "error in code for calculating discrimination index and eff…
Browse files Browse the repository at this point in the history
…iciency for randomly selected questions" Fixed the code for item stats.
  • Loading branch information
jamiesensei committed Nov 10, 2008
1 parent 7468604 commit 664bf34
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion mod/quiz/report/statistics/qstats.php
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,11 @@ function _initial_states_walker($state, &$stats, $positionstat = true){

function _secondary_states_walker($state, &$stats){
$gradedifference = ($state->grade - $stats->gradeaverage);
$othergradedifference = (($state->sumgrades - $state->grade) - $stats->othergradeaverage);
if ($stats->subquestion){
$othergradedifference = $state->sumgrades - $stats->othergradeaverage;
} else {
$othergradedifference = (($state->sumgrades - $state->grade) - $stats->othergradeaverage);
}
$overallgradedifference = $state->sumgrades - $this->sumgradesavg;
$sortedgradedifference = (array_shift($stats->gradearray) - $stats->gradeaverage);
$sortedothergradedifference = (array_shift($stats->othergradesarray) - $stats->othergradeaverage);
Expand Down

0 comments on commit 664bf34

Please sign in to comment.