version 1.6, 2000/08/11 14:25:24
|
version 1.12, 2000/10/02 22:23:19
|
Line 8 use Apache::lonxml;
|
Line 8 use Apache::lonxml;
|
use Apache::lonnet; |
use Apache::lonnet; |
use Apache::inputtags; |
use Apache::inputtags; |
use Apache::structuretags; |
use Apache::structuretags; |
|
use Apache::response; |
|
|
sub handler { |
sub handler { |
my $request=shift; |
my $request=shift; |
|
|
my $target=&get_target(); |
my $target=&get_target(); |
|
$Apache::lonxml::debug=1; |
$request->content_type('text/html'); |
$request->content_type('text/html'); |
$request->send_http_header; |
$request->send_http_header; |
&Apache::lonhomework::send_header($request); |
&Apache::lonhomework::send_header($request); |
Line 21 sub handler {
|
Line 23 sub handler {
|
my $result = ''; |
my $result = ''; |
&Apache::inputtags::initialize_inputtags; |
&Apache::inputtags::initialize_inputtags; |
$result = Apache::lonxml::xmlparse($target, &getfile($file), |
$result = Apache::lonxml::xmlparse($target, &getfile($file), |
&getfile('/home/httpd/html/res/103/albertel/default_homework').&setup_vars($target),%mystyle); |
&getfile('/home/httpd/html/res/adm/includes/default_homework.lcpm').&setup_vars($target),%mystyle); |
#$request->print("Result follows:"); |
#$request->print("Result follows:"); |
$request->print($result); |
$request->print($result); |
#$request->print(":Result ends"); |
#$request->print(":Result ends"); |
Line 34 sub get_target {
|
Line 36 sub get_target {
|
|
|
sub setup_vars { |
sub setup_vars { |
my ($target) = @_; |
my ($target) = @_; |
return ';$external::target='.$target.';'; |
return ';' |
|
# return ';$external::target='.$target.';'; |
} |
} |
|
|
sub send_header { |
sub send_header { |
Line 52 sub send_footer {
|
Line 55 sub send_footer {
|
sub getfile { |
sub getfile { |
my ($filename) = @_; |
my ($filename) = @_; |
my $a=""; |
my $a=""; |
&Apache::lonnet::repcopy($filename); |
if (! -e $filename ) { |
|
&Apache::lonnet::subscribe($filename); |
|
&Apache::lonnet::repcopy($filename); |
|
} |
{ |
{ |
my $fh=Apache::File->new($filename); |
my $fh=Apache::File->new($filename); |
|
|