--- loncom/xml/lonxml.pm 2002/01/07 18:11:57 1.146 +++ loncom/xml/lonxml.pm 2002/01/17 17:42:34 1.149 @@ -1,7 +1,7 @@ # The LearningOnline Network with CAPA # XML Parser Module # -# $Id: lonxml.pm,v 1.146 2002/01/07 18:11:57 albertel Exp $ +# $Id: lonxml.pm,v 1.149 2002/01/17 17:42:34 albertel Exp $ # # Copyright Michigan State University Board of Trustees # @@ -1011,6 +1011,8 @@ sub storefile { if (my $fh=Apache::File->new('>'.$file)) { print $fh $contents; $fh->close(); + } else { + &warning("Unable to save file $file"); } } @@ -1032,19 +1034,23 @@ sub inserteditinfo { SIMPLECONTENT } - my $editheader='Edit below
'; + + $filecontents =~ s::</textarea>:ig; +# my $editheader='Edit below
'; my $editfooter=(<

+ +
ENDFOOTER - $result=~s/(\]*\>)/$1$editheader/is; +# $result=~s/(\]*\>)/$1$editheader/is; $result=~s/(\<\/body\>)/$editfooter/is; return $result; } @@ -1077,7 +1083,7 @@ sub handler { } } my %mystyle; - my $result = ''; + my $result = ''; my $filecontents=&Apache::lonnet::getfile($file); if ($filecontents == -1) { $result=(<uri); $request->print($result); return OK; } - + sub debug { if ($Apache::lonxml::debug eq 1) { $|=1;