Diff for /loncom/interface/lonhtmlcommon.pm between versions 1.274 and 1.275

version 1.274, 2010/06/02 05:34:27 version 1.275, 2010/06/09 14:55:22
Line 1049  sub Update_PrgWin { Line 1049  sub Update_PrgWin {
   
 # increment progress state  # increment progress state
 sub Increment_PrgWin {  sub Increment_PrgWin {
     my ($r,$prog_state,$extraInfo)=@_;      my ($r,$prog_state,$extraInfo,$step)=@_;
     $$prog_state{'done'}++;      if ($step !~ /^\d+$/) {
           $step = 1; # default
       }
       $$prog_state{'done'} += $step;
   
       # Catch (max modulo step) <> 0
       my $current = $$prog_state{'done'};
       my $last = ($$prog_state{'max'} - $current);
       if ($last <= 0) {
           $last = 1;
           $current = $$prog_state{'max'};
       }
   
     my $time_est= (&Time::HiRes::time() - $$prog_state{'firststart'})/      my $time_est= (&Time::HiRes::time() - $$prog_state{'firststart'})/
         $$prog_state{'done'} *          $current * $last;
  ($$prog_state{'max'}-$$prog_state{'done'});  
     $time_est = int($time_est);      $time_est = int($time_est);
     #      #
     my $min = int($time_est/60);      my $min = int($time_est/60);
Line 1100  sub Increment_PrgWin { Line 1111  sub Increment_PrgWin {
         $$prog_state{'window'}.'.document.'.          $$prog_state{'window'}.'.document.'.
         $$prog_state{'formname'}.'.'.          $$prog_state{'formname'}.'.'.
         $$prog_state{'inputname'}.'.value="'.          $$prog_state{'inputname'}.'.value="'.
         $$prog_state{'done'}.'/'.$$prog_state{'max'}.          $current.'/'.$$prog_state{'max'}.
         ': '.$time_est.' '.&mt('remaining').' '.$lasttime.'";'          ': '.$time_est.' '.&mt('remaining').' '.$lasttime.'";'
     ));      ));
     $$prog_state{'laststart'}=&Time::HiRes::time();      $$prog_state{'laststart'}=&Time::HiRes::time();

Removed from v.1.274  
changed lines
  Added in v.1.275


FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>