--- loncom/publisher/Attic/lonconstruct.pm 2002/08/24 03:56:58 1.7 +++ loncom/publisher/Attic/lonconstruct.pm 2003/09/21 03:32:06 1.14 @@ -1,7 +1,7 @@ # The LearningOnline Network with CAPA # Construction Space Page Wrapper for Construction # -# $Id: lonconstruct.pm,v 1.7 2002/08/24 03:56:58 foxr Exp $ +# $Id: lonconstruct.pm,v 1.14 2003/09/21 03:32:06 taceyjo1 Exp $ # # Copyright Michigan State University Board of Trustees # @@ -43,7 +43,7 @@ use strict; use Apache::Constants qw(:common :http :methods); use Apache::lonnet; use Apache::Log (); - +use HTML::Entities(); my $DEBUG = 0; =pod @@ -103,13 +103,32 @@ sub handler { &Debug($r, "Initial URL for lower frame: ".$lowerframe); $lowerframe=~s/^\//\/\~/; &Debug($r, "Lower frame URL afer ~ subst: ".$lowerframe); - $lowerframe=~s/\"/"\;/g; + $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'; + } + $r->print(< -LON-CAPA Construction Space - +LON-CAPA Construction Space + + +