Browse Source

[svn r10091] Improved overall progress return value

Yannick Warnier 18 years ago
parent
commit
db91c1fe4c
1 changed files with 3 additions and 0 deletions
  1. 3 0
      main/newscorm/learnpath.class.php

+ 3 - 0
main/newscorm/learnpath.class.php

@@ -2187,6 +2187,9 @@ class learnpath {
     		}
     		elseif($mode == 'both')
     		{
+    			if($progress<($completed/($total?$total:1))){
+    				$progress = number_format(($completed/($total?$total:1))*100,0);
+    			}
     			return $progress.'% ('.$completed.'/'.$total.')';
     		}
     	}