--- loncom/publisher/Attic/lonconstruct.pm 2003/12/10 00:32:56 1.21 +++ loncom/publisher/Attic/lonconstruct.pm 2004/12/10 14:57:47 1.26 @@ -1,7 +1,7 @@ # The LearningOnline Network with CAPA # Construction Space Page Wrapper for Construction # -# $Id: lonconstruct.pm,v 1.21 2003/12/10 00:32:56 www Exp $ +# $Id: lonconstruct.pm,v 1.26 2004/12/10 14:57:47 raeburn Exp $ # # Copyright Michigan State University Board of Trustees # @@ -85,8 +85,6 @@ sub Debug { } - - # ================================================================ Main Handler sub handler { @@ -99,10 +97,14 @@ sub handler { return OK if $r->header_only; my $lowerframe=$r->path_info; + my $type='file'; + if ($lowerframe =~ /\/$/) { + $type = 'dir'; + } &Debug($r, "Initial URL for lower frame: ".$lowerframe); $lowerframe=~s/^\//\/\~/; &Debug($r, "Lower frame URL afer ~ subst: ".$lowerframe); - $lowerframe= &HTML::Entities::encode($lowerframe); + $lowerframe= &HTML::Entities::encode($lowerframe,'<>&"'); &Debug($r, "Lower frame URL after quote subst: ".$lowerframe); # @@ -119,6 +121,16 @@ sub handler { if ($ENV{'form.forceColoredit'}) { $lowerframe.='?editmode=Edit&problemmode=Edit'; } + +# +# Checking to see if we should display the topframe +# + my $toprows = 0; + my $topsrc = ''; + if ($ENV{'environment.remote'} ne 'off') { + $toprows = '110'; + $topsrc = '/adm/pubmenu?disp='.$type; + } $r->print(< LON-CAPA Construction Space @@ -126,8 +138,8 @@ sub handler { var lastknownpriv="$lowerframe"; - - + +