]> git.mjollnir.org Git - moodle.git/commitdiff
MDL-16952 "after DB field type changes standard deviation and facility index show...
authorjamiesensei <jamiesensei>
Tue, 21 Oct 2008 09:32:24 +0000 (09:32 +0000)
committerjamiesensei <jamiesensei>
Tue, 21 Oct 2008 09:32:24 +0000 (09:32 +0000)
mod/quiz/report/statistics/qstats.php
mod/quiz/report/statistics/statistics_table.php

index 7935df3f8543b57297ba7d91dc48cbf5cf41f35f..4f00b88223ef0286cc0156fd52a336a5d117c205 100644 (file)
@@ -135,7 +135,7 @@ class qstats{
 
     function _initial_question_walker(&$stats){
         $stats->gradeaverage = $stats->totalgrades / $stats->s;
-        if ($stats->maxgrade){
+        if ($stats->maxgrade!=0){
             $stats->facility = $stats->gradeaverage / $stats->maxgrade;
         } else {
             $stats->facility = null;
index e4681b4393a52fee6c50f860dc404a24e3d3e2ae..694fd06d6e027c2206a5301dad124d6d4dade1f3 100644 (file)
@@ -171,7 +171,7 @@ class quiz_report_statistics_table extends flexible_table {
     }
     
     function col_sd($question){
-        if (!is_null($question->_stats->sd) && $question->_stats->maxgrade){
+        if (!is_null($question->_stats->sd) && ($question->_stats->maxgrade!=0)){
             return number_format($question->_stats->sd*100 / $question->_stats->maxgrade, 2).'%';
         } else {
             return '';