--- loncom/xml/lonxml.pm 2002/07/29 22:06:38 1.186 +++ loncom/xml/lonxml.pm 2002/10/08 17:09:09 1.199 @@ -1,7 +1,7 @@ # The LearningOnline Network with CAPA # XML Parser Module # -# $Id: lonxml.pm,v 1.186 2002/07/29 22:06:38 www Exp $ +# $Id: lonxml.pm,v 1.199 2002/10/08 17:09:09 albertel Exp $ # # Copyright Michigan State University Board of Trustees # @@ -99,6 +99,7 @@ use Apache::edit(); use Apache::lonnet(); use Apache::File(); use Apache::loncommon(); +use Apache::lonfeedback(); #================================================== Main subroutine: xmlparse #debugging control, to turn on debugging modify the correct handler @@ -154,6 +155,7 @@ sub xmlbegin { } sub xmlend { + my ($discussiononly,$symb)=@_; my $discussion=''; if ($ENV{'request.course.id'}) { my $crs='/'.$ENV{'request.course.id'}; @@ -162,14 +164,18 @@ sub xmlend { } $crs=~s/\_/\//g; my $seeid=&Apache::lonnet::allowed('rin',$crs); - my $symb=&Apache::lonnet::symbread(); + unless ($symb) { + $symb=&Apache::lonnet::symbread(); + } if ($symb) { my %contrib=&Apache::lonnet::restore($symb,$ENV{'request.course.id'}, $ENV{'course.'.$ENV{'request.course.id'}.'.domain'}, $ENV{'course.'.$ENV{'request.course.id'}.'.num'}); if ($contrib{'version'}) { - $discussion.= - '
'.$sender.' ('. @@ -211,11 +227,28 @@ sub xmlend { } } } - $discussion.='
'; + unless ($discussiononly) { + $discussion.=''; + } + } + if ($discussiononly) { + $discussion.=(<