--- loncom/interface/lonnavmaps.pm 2002/10/11 18:39:55 1.73
+++ loncom/interface/lonnavmaps.pm 2002/10/17 19:25:27 1.84
@@ -2,7 +2,7 @@
# The LearningOnline Network with CAPA
# Navigate Maps Handler
#
-# $Id: lonnavmaps.pm,v 1.73 2002/10/11 18:39:55 bowersj2 Exp $
+# $Id: lonnavmaps.pm,v 1.84 2002/10/17 19:25:27 bowersj2 Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -823,7 +823,7 @@ sub new_handle {
# Initialize the nav map
my $navmap = Apache::lonnavmaps::navmap->new(
$ENV{"request.course.fn"}.".db",
- $ENV{"request.course.fn"}."_parms.db", 1);
+ $ENV{"request.course.fn"}."_parms.db", 1, 1);
if (!defined($navmap)) {
@@ -849,10 +849,6 @@ sub new_handle {
$r->print(' Discussions'.
'
New message (click to open)
'); } - #if (($currenturl=~/^\/res/) && - # ($currenturl!~/^\/res\/adm/)) { - # $r->print('Current Location
');
- #}
# Check that it's defined
if (!($navmap->courseMapDefined())) {
@@ -917,20 +913,58 @@ sub new_handle {
my $currenturl = $ENV{'form.postdata'};
$currenturl=~s/^http\:\/\///;
$currenturl=~s/^[^\/]+//;
- my $queryAdd = "postdata=" . &Apache::lonnet::escape($currenturl);
+ # alreadyHere allows us to only open the maps necessary to view
+ # the current location once, while at the same time remembering
+ # the current location. Without that check, the user would never
+ # be able to close those maps; the user would close it, and the
+ # currenturl scan would re-open it.
+ my $queryAdd = "postdata=" . &Apache::lonnet::escape($currenturl) .
+ "&alreadyHere=1";
$r->print('Show All Resources
');
# Begin the HTML table
# four cols: resource + indent, chat+feedback, icon, text string
- $r->print('