--- loncom/interface/lonmenu.pm 2012/05/29 16:25:53 1.380 +++ loncom/interface/lonmenu.pm 2012/07/05 19:22:47 1.382 @@ -1,7 +1,7 @@ # The LearningOnline Network with CAPA # Routines to control the menu # -# $Id: lonmenu.pm,v 1.380 2012/05/29 16:25:53 raeburn Exp $ +# $Id: lonmenu.pm,v 1.382 2012/07/05 19:22:47 raeburn Exp $ # # Copyright Michigan State University Board of Trustees # @@ -732,13 +732,17 @@ $menuitems.="&Notes&&annotate()&"; $menuitems.="Make notes and annotations about this resource&&1\n"; unless ($env{'request.noversionuri'}=~/\/(bulletinboard|smppg|navmaps|syllabus|aboutme|viewclasslist|portfolio)(\?|$)/) { - if ((!$env{'request.enc'}) && ($env{'request.noversionuri'} !~ m{^/adm/wrapper/ext/})) { + if ((!$env{'request.enc'}) && ($env{'request.noversionuri'} !~ m{^/adm/wrapper/ext/}) && ($env{'request.noversionuri'} !~ m{^/uploaded/$match_domain/$match_courseid/docs/})) { $menuitems.=(< 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 && @interval > 1)) { + (!$duedate && $hastimeleft)) { my ($collapse,$expand,$alttxt,$title,$currdisp); - if (@interval > 1) { + if (@interval > 1 && $hastimeleft) { $currdisp = 'inline'; $collapse = '► '; } else {