--- loncom/homework/lonhomework.pm 2000/07/25 17:45:40 1.1 +++ loncom/homework/lonhomework.pm 2000/07/25 21:27:30 1.2 @@ -5,22 +5,50 @@ package Apache::lonhomework; use strict; use Apache::style; use Apache::lonxml; +use Apache::lonnet; +use Apache::inputtags; +use Apache::structuretags; sub handler { my $request=shift; - my @parsecontents; - { - my $fh=Apache::File->new($request->filename); - @parsecontents=<$fh>; - } - - my $parsestring=join('',@parsecontents); - $request->content_type('text/html'); $request->send_http_header; - $request->print(' -
'); + $request->print(''); +} + +sub getfile { + my ($filename) = @_; + my $a=""; + &Apache::lonnet::repcopy($filename); + { + my $fh=Apache::File->new($filename); + + while (<$fh>) { + $a .=$_; + } + } + return $a } 1;