From 2977a114c1fe93fbf4e97f1cc048968b96c9c89a Mon Sep 17 00:00:00 2001 From: Yannick Warnier Date: Sun, 31 May 2009 09:39:41 +0200 Subject: [PATCH] [svn r21131] Added comment about default max score election. --- main/inc/lib/tracking.lib.php | 1 + 1 file changed, 1 insertion(+) diff --git a/main/inc/lib/tracking.lib.php b/main/inc/lib/tracking.lib.php index 8b3628a743..39fffa9365 100644 --- a/main/inc/lib/tracking.lib.php +++ b/main/inc/lib/tracking.lib.php @@ -421,6 +421,7 @@ class Tracking { if ($num_rows_max_score==1) { while ($row_max_score=Database::fetch_array($res_max_score)) { if ($row_max_score['max_score']==0) { + //when there's no max score, we assume 100 as the max score, as the SCORM 1.2 says that the value should always be between 0 and 100. $lp_scorm_result_score_total+=($row_max_score['score']/100); } else { $lp_scorm_result_score_total+=($row_max_score['score']/$row_max_score['max_score']);