--- loncom/xml/lonxml.pm 2002/12/13 21:39:19 1.221
+++ loncom/xml/lonxml.pm 2003/01/07 17:02:10 1.223
@@ -1,7 +1,7 @@
# The LearningOnline Network with CAPA
# XML Parser Module
#
-# $Id: lonxml.pm,v 1.221 2002/12/13 21:39:19 albertel Exp $
+# $Id: lonxml.pm,v 1.223 2003/01/07 17:02:10 albertel Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -192,7 +192,8 @@ sub xmlend {
my $idx;
for ($idx=1;$idx<=$contrib{'version'};$idx++) {
my $hidden=($contrib{'hidden'}=~/\.$idx\./);
- unless (($hidden) && (!$seeid)) {
+ my $deleted=($contrib{'deleted'}=~/\.$idx\./);
+ unless ((($hidden) && (!$seeid)) || ($deleted)) {
my $message=$contrib{$idx.':message'};
$message=~s/\n/\
/g;
$message=&Apache::lontexconvert::msgtexconverted($message);
@@ -226,8 +227,10 @@ sub xmlend {
} else {
$sender.=' Hide';
- }
- }
+ }
+ $sender.=' Delete';
+ }
} else {
if ($screenname) {
$sender=''.$screenname.'';
@@ -1122,7 +1125,8 @@ sub get_all_text {
if ( $tag =~ m:^/: ) {
my $tag=substr($tag,1);
#&Apache::lonxml::debug("have:$tag:");
- while (($depth >=0) && ($#$pars > -1)) {
+ my $top_empty=0;
+ while (($depth >=0) && ($#$pars > -1) && (!$top_empty)) {
while (($depth >=0) && ($token = $$pars[-1]->get_token)) {
#&Apache::lonxml::debug("e token:$token->[0]:$depth:$token->[1]:".$#$pars.":".$#Apache::lonxml::pwd);
if (($token->[0] eq 'T')||($token->[0] eq 'C')||($token->[0] eq 'D')) {
@@ -1144,6 +1148,7 @@ sub get_all_text {
pop(@$pars);
pop(@Apache::lonxml::pwd);
}
+ if (($depth >=0) && ($#$pars == 0) ) { $top_empty=1; }
}
} else {
while ($#$pars > -1) {