version 1.34, 2008/02/03 01:11:01
|
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 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 59 my $DEBUG = 0;
|
Line 65 my $DEBUG = 0;
|
|
|
=cut |
=cut |
|
|
|
package Apache::lonconstruct; |
|
|
|
|
|
use strict; |
|
use Apache::Constants qw(:common :http :methods); |
|
use Apache::lonnet; |
|
use HTML::Entities(); |
|
|
|
my $DEBUG = 0; |
|
|
|
|
sub Debug { |
sub Debug { |
# Put out the indicated message but only if DEBUG is true. |
# Put out the indicated message but only if DEBUG is true. |
if ($DEBUG) { |
if ($DEBUG) { |
Line 100 sub handler {
|
Line 117 sub handler {
|
$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 $js=qq| |
|
<script type="text/javascript"> |
|
var lastknownpriv="$lowerframe"; |
|
</script> |
|
|; |
|
|
|
my $start_page= |
|
&Apache::loncommon::start_page('Construction Space',$js, |
|
{'frameset' => 1, |
|
'add_entries' => { |
|
'rows' => "$toprows,*", |
|
'border' => "0",}}); |
|
my $end_page= |
|
&Apache::loncommon::end_page({'frameset' => 1}); |
|
|
|
$r->print(<<ENDPAGE); |
|
$start_page |
|
<frame src='$topsrc' /> |
|
<frame src="$lowerframe" name="LONCAPAToBePublished" /> |
|
$end_page |
|
ENDPAGE |
|
return OK; |
return OK; |
} |
} |
1; |
1; |