--- loncom/homework/lonhomework.pm 2000/10/02 22:23:19 1.12
+++ loncom/homework/lonhomework.pm 2000/10/05 19:25:38 1.13
@@ -22,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.lcpm').&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");