version 1.78, 2004/06/17 18:22:13
|
version 1.83, 2004/07/19 21:14:15
|
Line 772 sub Increment_PrgWin {
|
Line 772 sub Increment_PrgWin {
|
$$prog_state{'done'} * |
$$prog_state{'done'} * |
($$prog_state{'max'}-$$prog_state{'done'}); |
($$prog_state{'max'}-$$prog_state{'done'}); |
$time_est = int($time_est); |
$time_est = int($time_est); |
if (int ($time_est/60) > 0) { |
# |
my $min = int($time_est/60); |
my $min = int($time_est/60); |
my $sec = $time_est % 60; |
my $sec = $time_est % 60; |
$time_est = $min.' '.&mt('minutes'); |
# |
if ($min < 10) { |
my $str; |
if ($sec > 1) { |
if ($min == 1 && $sec > 1) { |
$time_est.= ', '.$sec.' '.&mt('seconds'); |
$str = '[_2] seconds'; |
} elsif ($sec > 0) { |
} elsif ($min == 1 && $sec < 2) { |
$time_est.= ', '.$sec.' '.&mt('second'); |
$str = '1 minute'; |
} |
} elsif ($min < 10 && $sec > 1) { |
} |
$str = '[_1] minutes, [_2] seconds'; |
} else { |
} elsif ($min >= 10 || $sec < 2) { |
$time_est .= ' '.&mt('seconds'); |
$str = '[_1] minutes'; |
} |
} |
|
$time_est = &mt($str,$min,$sec); |
|
# |
my $lasttime = &Time::HiRes::time()-$$prog_state{'laststart'}; |
my $lasttime = &Time::HiRes::time()-$$prog_state{'laststart'}; |
if ($lasttime > 9) { |
if ($lasttime > 9) { |
$lasttime = int($lasttime); |
$lasttime = int($lasttime); |
Line 1055 returns: nothing
|
Line 1057 returns: nothing
|
} @Crumbs |
} @Crumbs |
); |
); |
$links .= '->' if ($links ne ''); |
$links .= '->' if ($links ne ''); |
$links .= '<b>'.$last->{'text'}.'</b>'; |
$links .= '<b>'.&mt($last->{'text'}).'</b>'; |
# |
# |
my $icons = ''; |
my $icons = ''; |
$faq = $last->{'faq'} if (exists($last->{'faq'})); |
$faq = $last->{'faq'} if (exists($last->{'faq'})); |
$bug = $last->{'bug'} if (exists($last->{'bug'})); |
$bug = $last->{'bug'} if (exists($last->{'bug'})); |
if ($faq ne '') { |
# if ($faq ne '') { |
$icons .= &Apache::loncommon::help_open_faq($faq); |
# $icons .= &Apache::loncommon::help_open_faq($faq); |
} |
# } |
if ($bug ne '') { |
# if ($bug ne '') { |
$icons .= &Apache::loncommon::help_open_bug($bug); |
# $icons .= &Apache::loncommon::help_open_bug($bug); |
|
# } |
|
if (defined($component_help)) { |
|
$icons .= |
|
&Apache::loncommon::help_open_topic($component_help); |
} |
} |
|
$icons .= &Apache::loncommon::help_open_menu($color,$component,$component_help,$function,$faq,$bug); |
if ($icons ne '') { |
if ($icons ne '') { |
$Str .= $icons.' '; |
$Str .= $icons.' '; |
} |
} |
Line 1074 returns: nothing
|
Line 1081 returns: nothing
|
# |
# |
if (defined($component)) { |
if (defined($component)) { |
$Str .= '<td align="right" bgcolor="'.$color.'">'. |
$Str .= '<td align="right" bgcolor="'.$color.'">'. |
'<font size="+1">'.&mt($component).'</font>'; |
'<font size="+1">'.&mt($component).'</font></td>'; |
if (defined($component_help)) { |
|
$Str .= |
|
&Apache::loncommon::help_open_topic($component_help); |
|
} |
|
$Str.= '</td>'; |
|
} |
} |
$Str .= '</tr></table>'."\n"; |
$Str .= '</tr></table>'."\n"; |
# |
# |