--- loncom/interface/lonnavmaps.pm 2005/03/01 00:41:01 1.317 +++ loncom/interface/lonnavmaps.pm 2005/06/17 21:17:09 1.329 @@ -1,7 +1,7 @@ # The LearningOnline Network with CAPA # Navigate Maps Handler # -# $Id: lonnavmaps.pm,v 1.317 2005/03/01 00:41:01 albertel Exp $ +# $Id: lonnavmaps.pm,v 1.329 2005/06/17 21:17:09 albertel Exp $ # # Copyright Michigan State University Board of Trustees # @@ -110,7 +110,7 @@ sub launch_win { } sub close { - if ($ENV{'environment.remotenavmap'} ne 'on') { return ''; } + if ($env{'environment.remotenavmap'} ne 'on') { return ''; } return(< window.status='Accessing Nav Control'; @@ -124,8 +124,8 @@ ENDCLOSE } sub update { - if ($ENV{'environment.remotenavmap'} ne 'on') { return ''; } - if (!$ENV{'request.course.id'}) { return ''; } + if ($env{'environment.remotenavmap'} ne 'on') { return ''; } + if (!$env{'request.course.id'}) { return ''; } if ($ENV{'REQUEST_URI'}=~m|^/adm/navmaps|) { return ''; } return(< @@ -147,7 +147,7 @@ sub real_handler { #my $t0=[&gettimeofday()]; # Handle header-only request if ($r->header_only) { - if ($ENV{'browser.mathml'}) { + if ($env{'browser.mathml'}) { &Apache::loncommon::content_type($r,'text/xml'); } else { &Apache::loncommon::content_type($r,'text/html'); @@ -157,7 +157,7 @@ sub real_handler { } # Send header, don't cache this page - if ($ENV{'browser.mathml'}) { + if ($env{'browser.mathml'}) { &Apache::loncommon::content_type($r,'text/xml'); } else { &Apache::loncommon::content_type($r,'text/html'); @@ -213,7 +213,7 @@ ENDSUBM if (!defined($navmap)) { my $requrl = $r->uri; - $ENV{'user.error.msg'} = "$requrl:bre:0:0:Course not initialized"; + $env{'user.error.msg'} = "$requrl:bre:0:0:Course not initialized"; return HTTP_NOT_ACCEPTABLE; } my $html=&Apache::lonxml::xmlbegin(); @@ -226,7 +226,7 @@ ENDSUBM my $addentries=''; my $more_unload; my $body_only=''; - if ($ENV{'environment.remotenavmap'} eq 'on') { + if ($env{'environment.remotenavmap'} eq 'on') { $r->print(''); $r->rflush(); @@ -280,9 +280,9 @@ ENDSUBM if ($sequenceCount == 1) { # The automatic iterator creation in the render call # will pick this up. We know the condition because - # the defined($ENV{'form.filter'}) also ensures this + # the defined($env{'form.filter'}) also ensures this # is a fresh call. - $ENV{'form.filter'} = "$sequenceId"; + $env{'form.filter'} = "$sequenceId"; } } @@ -297,10 +297,10 @@ ENDSUBM '); } - if ($ENV{'environment.remotenavmap'} ne 'on') { + if ($env{'environment.remotenavmap'} ne 'on') { $r->print(&launch_win('link','yes',\%toplinkitems)); } - if ($ENV{'environment.remotenavmap'} eq 'on') { + if ($env{'environment.remotenavmap'} eq 'on') { &add_linkitem(\%toplinkitems,'closenav','collapse()', "Close navigation window"); } @@ -327,10 +327,10 @@ ENDSUBM pop @$stack; # last resource in the stack is the problem # itself, which we don't need in the map stack my @mapPcs = map {$_->map_pc()} @$stack; - $ENV{'form.filter'} = join(',', @mapPcs); + $env{'form.filter'} = join(',', @mapPcs); # Mark as both "here" and "jump" - $ENV{'form.postsymb'} = $curRes->symb(); + $env{'form.postsymb'} = $curRes->symb(); } } } @@ -351,30 +351,30 @@ ENDSUBM # Display only due homework. my $showOnlyHomework = 0; - if ($ENV{'form.showOnlyHomework'} eq "1") { + if ($env{'form.showOnlyHomework'} eq "1") { $showOnlyHomework = 1; $suppressEmptySequences = 1; $filterFunc = sub { my $res = shift; return $res->completable() || $res->is_map(); }; &add_linkitem(\%toplinkitems,'everything', - 'location.href="navmaps?sort='.$ENV{'form.sort'}.'"', + 'location.href="navmaps?sort='.$env{'form.sort'}.'"', "Show Everything"); $r->print("

".&mt("Uncompleted Homework")."

"); - $ENV{'form.filter'} = ''; - $ENV{'form.condition'} = 1; + $env{'form.filter'} = ''; + $env{'form.condition'} = 1; $resource_no_folder_link = 1; } else { &add_linkitem(\%toplinkitems,'uncompleted', - 'location.href="navmaps?sort='.$ENV{'form.sort'}. + 'location.href="navmaps?sort='.$env{'form.sort'}. '&showOnlyHomework=1"', "Show Only Uncompleted Homework"); } - my %selected=($ENV{'form.sort'} => 'selected=on'); + my %selected=($env{'form.sort'} => 'selected=on'); my $sort_html=("
- +