Browse Source

fixed avoid division by zero BT#540

Carlos Vargas 15 years ago
parent
commit
ad430e9bf4
1 changed files with 3 additions and 1 deletions
  1. 3 1
      main/inc/lib/tracking.lib.php

+ 3 - 1
main/inc/lib/tracking.lib.php

@@ -483,8 +483,10 @@ class Tracking {
 		                    }
 							$count_items++;
 						}
-						$score_of_scorm_calculate += round((($lp_scorm_result_score_total/$count_items)*100),2);
+						
+						$score_of_scorm_calculate += $count_items?round((($lp_scorm_result_score_total/$count_items)*100),2):0;						
                         $count_views++;
+                        
 					}
 				}