--- loncom/publisher/Attic/lonconstruct.pm	2003/05/28 21:07:19	1.10
+++ loncom/publisher/Attic/lonconstruct.pm	2003/11/18 04:08:15	1.19
@@ -1,7 +1,7 @@
 # The LearningOnline Network with CAPA
 # Construction Space Page Wrapper for Construction
 #
-# $Id: lonconstruct.pm,v 1.10 2003/05/28 21:07:19 www Exp $
+# $Id: lonconstruct.pm,v 1.19 2003/11/18 04:08:15 taceyjo1 Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -44,8 +44,6 @@ use Apache::Constants qw(:common :http :
 use Apache::lonnet;
 use Apache::Log ();
 use HTML::Entities();
-use Apache::loncommon;
-use Apache::lonmenu;
 
 my $DEBUG = 0;
 =pod
@@ -101,23 +99,41 @@ 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);
-   my $loadevents=&Apache::lonmenu::loadevents();
-   my $unloadevents=&Apache::lonmenu::unloadevents();
-   my $script=&Apache::lonmenu::registerurl();
+   &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';
+   }
+   &Apache::loncommon::get_unprocessed_cgi
+	($ENV{'QUERY_STRING'},['decompress']);
+   if ($ENV{'form.decompress'}) {
+	&Apache::lonnet::appenv('cgi.path' => $r->path_info);
+	$lowerframe="http://$ENV{SERVER_NAME}/cgi-bin/decompress.pl";
+	
+   }
    $r->print(<<ENDPAGE);
 <html>
 <head><title>LON-CAPA Construction Space</title>
-$script
+<script language="JavaScript">
+var lastknownpriv="$lowerframe";
+</script>
 </head>
-<frameset rows="110,*" border="0" 
-onLoad="$loadevents" 
-onUnload="$unloadevents">
+<frameset rows="110,*" border="0">
 <frame src='/adm/publisher.html'>
 <frame src="$lowerframe" name="LONCAPAToBePublished">
 </frameset>