--- loncom/interface/lonnavmaps.pm 2005/07/15 05:20:37 1.334 +++ loncom/interface/lonnavmaps.pm 2005/09/20 07:52:03 1.337 @@ -1,7 +1,7 @@ # The LearningOnline Network with CAPA # Navigate Maps Handler # -# $Id: lonnavmaps.pm,v 1.334 2005/07/15 05:20:37 albertel Exp $ +# $Id: lonnavmaps.pm,v 1.337 2005/09/20 07:52:03 albertel Exp $ # # Copyright Michigan State University Board of Trustees # @@ -90,14 +90,20 @@ my %colormap = my $hurryUpColor = "#FF0000"; sub launch_win { - my ($mode,$script,$toplinkitems)=@_; + my ($mode,$script,$toplinkitems,$firsttime)=@_; my $result; if ($script ne 'no') { $result.=' +MENU + } + } + if ($ENV{QUERY_STRING} eq 'turningOffExternal') { + $env{'environment.remotenavmap'}='off'; } # Create the nav map @@ -290,7 +310,7 @@ ENDSUBM if ($ENV{QUERY_STRING} eq 'launchExternal') { $r->print(' -
'); $r->print(' @@ -1164,7 +1184,11 @@ sub render_communication_status { my $discussionHTML = ""; my $feedbackHTML = ""; my $errorHTML = ""; my $link = $params->{"resourceLink"}; - my $linkopen = ""; + my $target; + if ($env{'environment.remotenavmap'} eq 'on') { + $target=' target="loncapaclient" '; + } + my $linkopen = ""; my $linkclose = ""; my $location=&Apache::loncommon::lonhttpdurl("/adm/lonMisc"); if ($resource->hasDiscussion()) { @@ -1177,7 +1201,7 @@ sub render_communication_status { my $feedback = $resource->getFeedback(); foreach (split(/\,/, $feedback)) { if ($_) { - $feedbackHTML .= ' ' . ''; @@ -1192,7 +1216,7 @@ sub render_communication_status { last if ($errorcount>=10); # Only output 10 bombs maximum if ($_) { $errorcount++; - $errorHTML .= ' ' . ''; @@ -1214,7 +1238,11 @@ sub render_quick_status { $params->{'multipart'} && $part eq "0"; my $link = $params->{"resourceLink"}; - my $linkopen = ""; + my $target; + if ($env{'environment.remotenavmap'} eq 'on') { + $target=' target="loncapaclient" '; + } + my $linkopen = ""; my $linkclose = ""; if ($resource->is_problem() && @@ -3611,7 +3639,7 @@ sub is_page { sub is_problem { my $self=shift; my $src = $self->src(); - return ($src =~ /\.(problem|exam|quiz|assess|survey|form|library)$/) + return ($src =~ /\.(problem|exam|quiz|assess|survey|form|library|task)$/) } sub contains_problem { my $self=shift; @@ -4115,7 +4143,8 @@ sub extractParts { return; } foreach (split(/\,/,$metadata)) { - if ($_ =~ /^part_(.*)$/) { + if ($_ =~ /^(?:part|Task)_(.*)$/) { + &Apache::lonnet::logthis($self->src()." part -> ".$1); my $part = $1; # This floods the logs if it blows up if (defined($parts{$part})) {