--- loncom/publisher/Attic/lonconstruct.pm 2001/12/04 15:34:57 1.6 +++ loncom/publisher/Attic/lonconstruct.pm 2002/08/24 03:56:58 1.7 @@ -1,7 +1,7 @@ # The LearningOnline Network with CAPA # Construction Space Page Wrapper for Construction # -# $Id: lonconstruct.pm,v 1.6 2001/12/04 15:34:57 albertel Exp $ +# $Id: lonconstruct.pm,v 1.7 2002/08/24 03:56:58 foxr Exp $ # # Copyright Michigan State University Board of Trustees # @@ -36,11 +36,56 @@ # # 11/22,11/23,11/28, # 03/30/01 Gerd Kortemeyer - package Apache::lonconstruct; + use strict; -use Apache::Constants qw(:common :http); +use Apache::Constants qw(:common :http :methods); +use Apache::lonnet; +use Apache::Log (); + + +my $DEBUG = 0; +=pod + +=item Debug($request, $message) + + If debugging is enabled puts out a debuggin message determined by the + caller. The debug message goes to the Apache error log file. Debugging + is enabled by ssetting the module global DEBUG variable to nonzero (TRUE). + + Parameters: + +=over 4 + +=item $request - The curretn request operation. + +=item $message - The message to put inthe log file. + +=back + + Returns: + nothing. + +=cut + +sub Debug { + + # Marshall the parameters. + + my $r = shift; + my $log = $r->log; + my $message = shift; + + # Put out the indicated message butonly if DEBUG is false. + + if ($DEBUG) { + $log->debug($message); + } +} + + + # ================================================================ Main Handler @@ -54,14 +99,19 @@ 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=~s/\"/"\;/g; + &Debug($r, "LOwer frame URL after quote subst: ".$lowerframe); $r->print(< LON-CAPA Construction Space - + ENDPAGE