--- loncom/homework/lonhomework.pm 2000/08/02 16:47:06 1.3
+++ loncom/homework/lonhomework.pm 2000/08/11 14:25:24 1.6
@@ -12,22 +12,29 @@ use Apache::structuretags;
sub handler {
my $request=shift;
+ my $target=&get_target();
$request->content_type('text/html');
$request->send_http_header;
&Apache::lonhomework::send_header($request);
my $file = "/home/httpd/html".$request->uri;
my %mystyle;
+ my $result = '';
&Apache::inputtags::initialize_inputtags;
- my $result = Apache::lonxml::xmlparse("web",'/home/httpd/html/res/103/albertel/default_homework'.&setup_vars.&getfile($file),%mystyle);
+ $result = Apache::lonxml::xmlparse($target, &getfile($file),
+ &getfile('/home/httpd/html/res/103/albertel/default_homework').&setup_vars($target),%mystyle);
#$request->print("Result follows:");
$request->print($result);
#$request->print(":Result ends");
&Apache::lonhomework::send_footer($request);
}
+sub get_target {
+ return "web";
+}
+
sub setup_vars {
- $Apache::lonhomework::target="web";
- return '';
+ my ($target) = @_;
+ return ';$external::target='.$target.';';
}
sub send_header {