--- loncom/homework/lonhomework.pm 2000/09/19 18:04:47 1.10
+++ loncom/homework/lonhomework.pm 2000/10/05 19:25:38 1.13
@@ -14,6 +14,7 @@ sub handler {
my $request=shift;
my $target=&get_target();
+ $Apache::lonxml::debug=1;
$request->content_type('text/html');
$request->send_http_header;
&Apache::lonhomework::send_header($request);
@@ -21,8 +22,20 @@ sub handler {
my %mystyle;
my $result = '';
&Apache::inputtags::initialize_inputtags;
- $result = Apache::lonxml::xmlparse($target, &getfile($file),
- &getfile('/home/httpd/html/res/adm/includes/default_homework').&setup_vars($target),%mystyle);
+
+ my $problem=&Apache::lonnet::getfile($file);
+ if ($problem == -1) {
+ &Apache::lonxml::error(" Unable to find $file");
+ $problem='';
+ }
+ my $default=&Apache::lonnet::getfile('/home/httpd/html/res/adm/includes/default_homework.lcpm');
+ if ($default == -1) {
+ &Apache::lonxml::error("Unable to find $file");
+ $default='';
+ }
+
+ $result = Apache::lonxml::xmlparse($target, $problem,
+ $default.&setup_vars($target),%mystyle);
#$request->print("Result follows:");
$request->print($result);
#$request->print(":Result ends");
@@ -35,7 +48,8 @@ sub get_target {
sub setup_vars {
my ($target) = @_;
- return ';$external::target='.$target.';';
+ return ';'
+# return ';$external::target='.$target.';';
}
sub send_header {