--- loncom/publisher/Attic/lonconstruct.pm 2002/09/16 13:05:49 1.9 +++ loncom/publisher/Attic/lonconstruct.pm 2004/10/29 18:40:40 1.23 @@ -1,7 +1,7 @@ # The LearningOnline Network with CAPA # Construction Space Page Wrapper for Construction # -# $Id: lonconstruct.pm,v 1.9 2002/09/16 13:05:49 www Exp $ +# $Id: lonconstruct.pm,v 1.23 2004/10/29 18:40:40 raeburn Exp $ # # Copyright Michigan State University Board of Trustees # @@ -40,7 +40,7 @@ package Apache::lonconstruct; use strict; -use Apache::Constants qw(:common :http :methods); +use Apache::Constants qw(:common :http :methods REDIRECT); use Apache::lonnet; use Apache::Log (); use HTML::Entities(); @@ -85,8 +85,6 @@ sub Debug { } - - # ================================================================ Main Handler sub handler { @@ -99,18 +97,45 @@ sub handler { return OK if $r->header_only; my $lowerframe=$r->path_info; - &Debug($r, "Initial URL for lower frame: ".$lowerframe); $lowerframe=~s/^\//\/\~/; &Debug($r, "Lower frame URL afer ~ subst: ".$lowerframe); - $lowerframe= &HTML::Entities::encode($lowerframe); - &Debug($r, "LOwer frame URL after quote subst: ".$lowerframe); + $lowerframe= &HTML::Entities::encode($lowerframe,'<>&"'); + &Debug($r, "Lower frame URL after quote subst: ".$lowerframe); +# +# Are we forcing edit mode? +# + + &Apache::loncommon::get_unprocessed_cgi + ($ENV{'QUERY_STRING'},['forceedit']); + if ($ENV{'form.forceedit'}) { + $lowerframe.='?editmode=Edit&problemmode=EditXML'; + } + &Apache::loncommon::get_unprocessed_cgi + ($ENV{'QUERY_STRING'},['forceColoredit']); + 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'} eq 'on') { + $toprows = '110'; + $topsrc = '/adm/localize/adm/publisher.html'; + } $r->print(< -LON-CAPA Construction Space - - +LON-CAPA Construction Space + + + +