[LON-CAPA-cvs] cvs: loncom /interface lonhtmlcommon.pm
bisitz
bisitz@source.lon-capa.org
Fri, 18 Jun 2010 09:06:30 -0000
bisitz Fri Jun 18 09:06:30 2010 EDT
Modified files:
/loncom/interface lonhtmlcommon.pm
Log:
Simplified status bar counter step default (rev. 1.275, 1.277): just > 0 is enough
Index: loncom/interface/lonhtmlcommon.pm
diff -u loncom/interface/lonhtmlcommon.pm:1.278 loncom/interface/lonhtmlcommon.pm:1.279
--- loncom/interface/lonhtmlcommon.pm:1.278 Thu Jun 10 16:14:34 2010
+++ loncom/interface/lonhtmlcommon.pm Fri Jun 18 09:06:29 2010
@@ -1,7 +1,7 @@
# The LearningOnline Network with CAPA
# a pile of common html routines
#
-# $Id: lonhtmlcommon.pm,v 1.278 2010/06/10 16:14:34 bisitz Exp $
+# $Id: lonhtmlcommon.pm,v 1.279 2010/06/18 09:06:29 bisitz Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -940,7 +940,7 @@
=item $extraInfo A description of the items being iterated over. Typically
'student'.
-=item $step (optional) counter step. Will be set to default 1 if ommited.
+=item $step (optional) counter step. Will be set to default 1 if ommited. step must be greater than 0 or empty.
=back
@@ -1052,9 +1052,7 @@
# increment progress state
sub Increment_PrgWin {
my ($r,$prog_state,$extraInfo,$step)=@_;
- if ( ($step == 0) || ($step !~ /^\d+(\.\d+)*$/) ) {
- $step = 1; # default
- }
+ $step = $step > 0 ? $step : 1;
$$prog_state{'done'} += $step;
# Catch (max modulo step) <> 0