--- loncom/interface/lonnavmaps.pm 2003/06/17 21:04:00 1.206 +++ loncom/interface/lonnavmaps.pm 2003/06/18 15:49:24 1.208 @@ -1,7 +1,7 @@ # The LearningOnline Network with CAPA # Navigate Maps Handler # -# $Id: lonnavmaps.pm,v 1.206 2003/06/17 21:04:00 bowersj2 Exp $ +# $Id: lonnavmaps.pm,v 1.208 2003/06/18 15:49:24 bowersj2 Exp $ # # Copyright Michigan State University Board of Trustees # @@ -92,7 +92,10 @@ my %colormap = $resObj->TRIES_LEFT => '', $resObj->INCORRECT => '', $resObj->OPEN => '', - $resObj->NOTHING_SET => '' ); + $resObj->NOTHING_SET => '', + $resObj->ATTEMPTED => '', + $resObj->ANSWER_SUBMITTED => '' + ); # 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 = "#FF0000"; @@ -413,7 +416,7 @@ sub dueInLessThen24Hours { my $part = shift; my $status = $res->status($part); - return ($status == $res->OPEN() || $status == $res->ATTEMPTED() || + return ($status == $res->OPEN() || $status == $res->TRIES_LEFT()) && $res->duedate() && $res->duedate() < time()+(24*60*60) && $res->duedate() > time(); @@ -1018,7 +1021,7 @@ sub render_long_status { $params->{'multipart'} && $part eq "0"; my $color; - if ($resource->is_problem() && ($resource->countParts() <= 1 || $part ne '') ) { + if ($resource->is_problem() && ($resource->countParts() <= 1) ) { $color = $colormap{$resource->status}; if (dueInLessThen24Hours($resource, $part) || @@ -1496,6 +1499,16 @@ sub render { } } continue { $curRes = $it->next(); + + if ($r) { + # If we have the connection, make sure the user is still connected + my $c = $r->connection; + if ($c->aborted()) { + Apache::lonnet::logthis("navmaps aborted"); + # Who cares what we do, nobody will see it anyhow. + return ''; + } + } } # Print out the part that jumps to #curloc if it exists