Diff for /loncom/publisher/Attic/lonconstruct.pm between versions 1.30 and 1.37

version 1.30, 2005/04/07 06:56:26 version 1.37, 2010/04/12 15:05:51
Line 27 Line 27
 #  #
 #  #
   
 package Apache::lonconstruct;  
   
   =pod
   
 use strict;  =head1
 use Apache::Constants qw(:common :http :methods);  
 use Apache::lonnet;  =head1 NAME
 use Apache::Log ();  
 use HTML::Entities();  Apache::lonconstruct
   
   =head1 SYNOPSIS
   
   Page wrapper for handling construction space.
   
   This is part of the LearningOnline Network with CAPA project
   described at http://www.lon-capa.org.
   
 my $DEBUG = 0;  
 =pod  
   
 =item Debug($request, $message)  =item Debug($request, $message)
   
Line 60  my $DEBUG = 0; Line 65  my $DEBUG = 0;
   
 =cut  =cut
   
 sub Debug {  package Apache::lonconstruct;
     
   # Marshall the parameters.  
     use strict;
   my $r       = shift;  use Apache::Constants qw(:common :http :methods);
   my $log     = $r->log;  use Apache::lonnet;
   my $message = shift;  use HTML::Entities();
     
   # Put out the indicated message butonly if DEBUG is false.  my $DEBUG = 0;
     
   if ($DEBUG) {  
     $log->debug($message);  
   }  
 }  
   
   sub Debug {
       # Put out the indicated message but only if DEBUG is true.
       if ($DEBUG) {
    my ($r,$message) = @_;
    $r->log_reason($message);
       }
   } 
   
 # ================================================================ Main Handler  # ================================================================ Main Handler
   
Line 101  sub handler { Line 109  sub handler {
    &Apache::loncommon::get_unprocessed_cgi     &Apache::loncommon::get_unprocessed_cgi
         ($ENV{'QUERY_STRING'},['forceedit']);          ($ENV{'QUERY_STRING'},['forceedit']);
    if ($env{'form.forceedit'}) {     if ($env{'form.forceedit'}) {
        $lowerframe.='?editmode=Edit&problemmode=EditXML';         $lowerframe.='?editmode=Edit&problemmode=editxml';
    }     }
    &Apache::loncommon::get_unprocessed_cgi     &Apache::loncommon::get_unprocessed_cgi
         ($ENV{'QUERY_STRING'},['forceColoredit']);          ($ENV{'QUERY_STRING'},['forceColoredit']);
    if ($env{'form.forceColoredit'}) {     if ($env{'form.forceColoredit'}) {
        $lowerframe.='?editmode=Edit&problemmode=Edit';         $lowerframe.='?editmode=Edit&problemmode=edit';
    }     }
   
 #     # when the remote control existed we used to force the
 # Checking to see if we should display the topframe     # pages of construction space into a frameset.
 #     # without remote control, we can elimnate this frameset
    my $toprows = 0;     # and redirect to the url of the content frame.
    my $topsrc = '';     # This keeps all URLs intact. 
    if ($env{'environment.remote'} ne 'off') {     $r->internal_redirect($lowerframe);
        $toprows = '110';  
        $topsrc = '/adm/localize/adm/publisher.html';  
    }  
    my $html=&Apache::lonxml::xmlbegin();  
    $r->print(<<ENDPAGE);  
 $html  
 <head><title>LON-CAPA Construction Space</title>  
 <script type="text/javascript">  
 var lastknownpriv="$lowerframe";  
 </script>  
 </head>  
 <frameset rows="$toprows,*" border="0">  
 <frame src='$topsrc' />  
 <frame src="$lowerframe" name="LONCAPAToBePublished" />  
 </frameset>  
 </html>  
 ENDPAGE  
    return OK;     return OK;
 }  }
 1;  1;

Removed from v.1.30  
changed lines
  Added in v.1.37


FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>