--- loncom/interface/lonnavmaps.pm 2002/10/24 18:38:26 1.85 +++ loncom/interface/lonnavmaps.pm 2002/10/28 13:58:58 1.87 @@ -2,7 +2,7 @@ # The LearningOnline Network with CAPA # Navigate Maps Handler # -# $Id: lonnavmaps.pm,v 1.85 2002/10/24 18:38:26 bowersj2 Exp $ +# $Id: lonnavmaps.pm,v 1.87 2002/10/28 13:58:58 www Exp $ # # Copyright Michigan State University Board of Trustees # @@ -876,7 +876,7 @@ sub new_handle { $res->NOTHING_SET => '' ); # And a special case in the nav map; what to do when the assignment # is not yet done and due in less then 24 hours - my $hurryUpColor = "#FFCCCC"; + my $hurryUpColor = "#FF0000"; my %statusIconMap = ( $res->NETWORK_FAILURE => '', @@ -1153,13 +1153,16 @@ sub new_handle { } my $colorizer = ""; + my $color; if ($curRes->is_problem()) { my $status = $curRes->status($part); - my $color = $colormap{$status}; + $color = $colormap{$status}; # Special case in the navmaps: If in less then # 24 hours, give it a bit of urgency - if ($status == $curRes->OPEN() && $curRes->duedate() && + if (($status == $curRes->OPEN() || $status == $curRes->ATTEMPTED() || + $status == $curRes->TRIES_LEFT()) + && $curRes->duedate() && $curRes->duedate() < time()+(24*60*60) && $curRes->duedate() > time()) { $color = $hurryUpColor; @@ -1259,12 +1262,15 @@ sub new_handle { } # FOURTH COL: Text description - $r->print("\n"); + #$r->print("\n"); + $r->print("\n"); if ($curRes->kind() eq "res" && $curRes->is_problem() && !$firstDisplayed) { + $r->print ("") if ($color); $r->print (getDescription($curRes, $part)); + $r->print ("") if ($color); } if ($curRes->is_map() && advancedUser() && $curRes->randompick()) { $r->print('(randomly select ' . $curRes->randompick() .')'); @@ -2916,7 +2922,7 @@ sub getNext { sub getPrevious { my $self = shift; - my @alreadySeen = shift; + my $alreadySeenHash = shift; my @branches; my $from = $self->from(); foreach my $branch ( split /,/, $from) { @@ -2928,9 +2934,9 @@ sub getPrevious { # browse privs my $browsePriv = &Apache::lonnet::allowed('bre', $self->src); if (!defined($alreadySeenHash) || - !defined($alreadySeenHash->{$next->{ID}}) || + !defined($alreadySeenHash->{$prev->{ID}}) || ($browsePriv ne '2' && $browsePriv ne 'F')) { - push @branches, $next; + push @branches, $prev; } } return \@branches;