--- loncom/xml/lonxml.pm 2003/03/19 21:57:59 1.221.2.3
+++ loncom/xml/lonxml.pm 2002/12/26 16:40:33 1.222
@@ -1,7 +1,7 @@
# The LearningOnline Network with CAPA
# XML Parser Module
#
-# $Id: lonxml.pm,v 1.221.2.3 2003/03/19 21:57:59 albertel Exp $
+# $Id: lonxml.pm,v 1.222 2002/12/26 16:40:33 www 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.'';
@@ -693,8 +696,7 @@ sub inner_xmlparse {
if ($metamode<1) {
my $text=$token->[1];
if ($token->[0] eq 'C' && $target eq 'tex') {
- $text = '';
-# $text = '%'.$text."\n";
+ $text = '%'.$text."\n";
}
$result.=$text;
}
@@ -772,7 +774,7 @@ sub inner_xmlparse {
if ($token->[0] eq 'E') {
&end_tag($stack,$parstack,$token);
}
- }
+ }
if ($#$pars > -1) {
pop @$pars;
pop @Apache::lonxml::pwd;
@@ -1114,9 +1116,7 @@ sub store_counter {
sub get_all_text {
my($tag,$pars)= @_;
&Apache::lonxml::debug("Got a ".ref($pars));
- my $gotfullstack=1;
if (ref($pars) ne 'ARRAY') {
- $gotfullstack=0;
$pars=[$pars];
}
my $depth=0;
@@ -1125,8 +1125,7 @@ sub get_all_text {
if ( $tag =~ m:^/: ) {
my $tag=substr($tag,1);
#&Apache::lonxml::debug("have:$tag:");
- my $top_empty=0;
- while (($depth >=0) && ($#$pars > -1) && (!$top_empty)) {
+ while (($depth >=0) && ($#$pars > -1)) {
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')) {
@@ -1148,16 +1147,6 @@ sub get_all_text {
pop(@$pars);
pop(@Apache::lonxml::pwd);
}
- if (($depth >=0) && ($#$pars == 0) ) { &debug("here4");$top_empty=1; }
- }
- if ($top_empty && $depth >= 0) {
- #never found the end tag ran out of text, throw error send back blank
- &error('Never found end tag for <'.$tag.'>');
- if ($gotfullstack) {
- my $newstring=''.$tag.'>'.$result;
- &Apache::lonxml::newparser($pars,\$newstring);
- }
- $result='';
}
} else {
while ($#$pars > -1) {