Browse Source

[svn r19044] Minor - Fixed warning division by zero in score into learning path details - (partial SVN#3805)

Cristian Fasanando 16 years ago
parent
commit
c664632002
1 changed files with 1 additions and 1 deletions
  1. 1 1
      main/inc/lib/tracking.lib.php

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

@@ -431,7 +431,7 @@ class Tracking {
 								$total_score = Database::result($rsScores, 0, 0);
 								//echo $total_weighting += $item['max_score'];
 								$total_weighting += $maxscore;								
-								if($total_weighting>0) {
+								if($total_weighting>0 && $maxscore>0) {
 									//echo $total_score.' -  '.$maxscore; echo '<br>';
 									//echo $lp_scorm_score_total += ($total_score/$total_weighting)*100;
 									$lp_scorm_score_total += ($total_score/$maxscore)*100;