--- loncom/interface/lonmenu.pm 2012/05/28 22:22:20 1.369.2.11 +++ loncom/interface/lonmenu.pm 2012/05/29 19:41:27 1.369.2.13 @@ -1,7 +1,7 @@ # The LearningOnline Network with CAPA # Routines to control the menu # -# $Id: lonmenu.pm,v 1.369.2.11 2012/05/28 22:22:20 raeburn Exp $ +# $Id: lonmenu.pm,v 1.369.2.13 2012/05/29 19:41:27 raeburn Exp $ # # Copyright Michigan State University Board of Trustees # @@ -2024,10 +2024,20 @@ sub countdown_timer { ($env{'request.filename'}=~/$LONCAPA::assess_re/) && ($Apache::inputtags::status[-1] eq 'CAN_ANSWER')) { my $duedate = &Apache::lonnet::EXT("resource.0.duedate"); - if ($duedate && $duedate > time) { + my @interval=&Apache::lonnet::EXT("resource.0.interval"); + my $hastimeleft; + if (@interval > 1) { + my $first_access=&Apache::lonnet::get_first_access($interval[1]); + if ($first_access > 0) { + if ($first_access+$interval[0] > time) { + $hastimeleft = 1; + } + } + } + if (($duedate && $duedate > time) || + (!$duedate && $hastimeleft)) { my ($collapse,$expand,$alttxt,$title,$currdisp); - my @interval=&Apache::lonnet::EXT("resource.0.interval"); - if (@interval > 1) { + if (@interval > 1 && $hastimeleft) { $currdisp = 'inline'; $collapse = '► '; } else {