]> git.mjollnir.org Git - moodle.git/commitdiff
Merged stats fix for MDL-7151 from stable
authormoodler <moodler>
Mon, 23 Oct 2006 05:22:16 +0000 (05:22 +0000)
committermoodler <moodler>
Mon, 23 Oct 2006 05:22:16 +0000 (05:22 +0000)
course/user.php

index 218a780e4068a61d61315e7633e2f548e910a360..5560171144635b800ef656df0c702b3b68a452cb 100644 (file)
 
             echo '<center><img src="'.$CFG->wwwroot.'/course/report/stats/graph.php?mode='.STATS_MODE_DETAILED.'&course='.$course->id.'&time='.$time.'&report='.STATS_REPORT_USER_VIEW.'&userid='.$user->id.'" /></center>';
 
+            // What the heck is this about?   -- MD
             $stats = stats_fix_zeros($stats,$param->timeafter,$param->table,(!empty($param->line2)),(!empty($param->line3)));
-            
+
             $table = new object();
             $table->align = array('left','center','center','center');
             $param->table = str_replace('user_','',$param->table);
             $table->head = array(get_string('periodending','moodle',$param->table),$param->line1,$param->line2,$param->line3);
-            foreach  ($stats as $stat) {
+            foreach ($stats as $stat) {
+                if (!empty($stat->zerofixed)) {  // Don't know why this is necessary, see stats_fix_zeros above - MD
+                    continue;
+                }
                 $a = array(userdate($stat->timeend,get_string('strftimedate'),$CFG->timezone),$stat->line1);
                 $a[] = $stat->line2;
                 $a[] = $stat->line3;