Skip to content

Commit

Permalink
MDL-15268 "Content for Quiz Statistics report table" fixed a bug wher…
Browse files Browse the repository at this point in the history
…e every a row was added to the table for every time a subquestion was attempted.
  • Loading branch information
jamiesensei committed Jul 20, 2008
1 parent 375381a commit 66eb3b5
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
4 changes: 2 additions & 2 deletions mod/quiz/report/statistics/qstats.php
Expand Up @@ -127,8 +127,8 @@ function process_states(){
$subquestionstats[$itemid]->differentweights = true;
}
$this->_initial_states_walker($state, $subquestionstats[$itemid], false);
$subquestionstats[$itemid]->usedin[] = $state->question;
$this->questions[$state->question]->_stats->subitems[] = $itemid;
$subquestionstats[$itemid]->usedin[$state->question] = $state->question;
$this->questions[$state->question]->_stats->subitems[$itemid] = $itemid;
}
}
}
Expand Down
1 change: 1 addition & 0 deletions mod/quiz/report/statistics/report.php
Expand Up @@ -274,6 +274,7 @@ function display($quiz, $cm, $course) {
if (isset($qstats)){
foreach ($qstats->questions as $question){
$table->add_data_keyed($table->format_row($question));
ksort($question->_stats->subitems);
foreach ($question->_stats->subitems as $itemid){
$table->add_data_keyed($table->format_row($qstats->subquestions[$itemid]));
}
Expand Down

0 comments on commit 66eb3b5

Please sign in to comment.