--- loncom/interface/lonnavmaps.pm 2003/06/18 15:14:23 1.207 +++ loncom/interface/lonnavmaps.pm 2003/06/25 16:45:54 1.210 @@ -1,7 +1,7 @@ # The LearningOnline Network with CAPA # Navigate Maps Handler # -# $Id: lonnavmaps.pm,v 1.207 2003/06/18 15:14:23 bowersj2 Exp $ +# $Id: lonnavmaps.pm,v 1.210 2003/06/25 16:45:54 bowersj2 Exp $ # # Copyright Michigan State University Board of Trustees # @@ -1040,6 +1040,8 @@ sub render_long_status { if ($resource->is_map() && advancedUser() && $resource->randompick()) { $result .= '(randomly select ' . $resource->randompick() .')'; } + + $result .= "\n"; return $result; } @@ -1499,6 +1501,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 @@ -2216,11 +2228,6 @@ sub min { if ($a < $b) { return $a; } else { return $b; } } -# In the CVS repository, documentation of this algorithm is included -# in /doc/lonnavdocs, as a PDF and .tex source. Markers like **1** -# will reference the same location in the text as the part of the -# algorithm is running through. - sub new { # magic invocation to create a class instance my $proto = shift; @@ -2276,6 +2283,9 @@ sub new { # that isn't just a redirector. my $resource; my $resourceCount = 0; + # Documentation on this algorithm can be found in the CVS repository at + # /docs/lonnavdocs; these "**#**" markers correspond to documentation + # in that file. # **1** foreach my $pass (@iterations) {