--- loncom/interface/lonnavmaps.pm 2014/01/20 01:39:33 1.500 +++ loncom/interface/lonnavmaps.pm 2014/09/26 17:56:02 1.502 @@ -1,7 +1,7 @@ # The LearningOnline Network with CAPA # Navigate Maps Handler # -# $Id: lonnavmaps.pm,v 1.500 2014/01/20 01:39:33 raeburn Exp $ +# $Id: lonnavmaps.pm,v 1.502 2014/09/26 17:56:02 raeburn Exp $ # # Copyright Michigan State University Board of Trustees @@ -1140,12 +1140,17 @@ sub render_long_status { my $info = ''; if ($resource->is_problem() || $resource->is_practice()) { $color = $colormap{$resource->status}; - - if (dueInLessThan24Hours($resource, $part) || - lastTry($resource, $part)) { + + if (dueInLessThan24Hours($resource, $part)) { $color = $hurryUpColor; $info = ' title="'.&mt('Due in less than 24 hours!').'"'; - } + } elsif (lastTry($resource, $part)) { + unless (($resource->problemstatus($part) eq 'no') || + ($resource->problemstatus($part) eq 'no_feedback_ever')) { + $color = $hurryUpColor; + $info = ' title="'.&mt('One try remaining!').'"'; + } + } } if ($resource->kind() eq "res" && @@ -2015,7 +2020,7 @@ sub new { my $proto = shift; my $class = ref($proto) || $proto; my $self = {}; - bless($self); # So we can call change_user if neceesary + bless($self); # So we can call change_user if necessary $self->{USERNAME} = shift || $env{'user.name'}; $self->{DOMAIN} = shift || $env{'user.domain'}; @@ -2034,10 +2039,14 @@ sub new { # We can only tie the nav hash as done below if the username/domain # match the env one. Otherwise change_user does everything we need...since we can't - # assume there are course hashes for the specific requested user@domamin: + # assume there are course hashes for the specific requested user:domain + # Note: change_user is also called if we need the nav hash when printing CODEd + # assignments or printing an exam, in which the enclosing folder for the items in + # the exam has hidden set. # - if (($self->{USERNAME} eq $env{'user.name'}) && ($self->{DOMAIN} eq $env{'user.domain'}) && !$self->{CODE}) { + if (($self->{USERNAME} eq $env{'user.name'}) && ($self->{DOMAIN} eq $env{'user.domain'}) && + !$self->{CODE} && !$self->{NOHIDE}) { # tie the nav hash