[LON-CAPA-cvs] cvs: loncom(version_2_10_X) /xml lonxml.pm
raeburn
raeburn at source.lon-capa.org
Wed Nov 30 23:41:55 EST 2011
raeburn Thu Dec 1 04:41:55 2011 EDT
Modified files: (Branch: version_2_10_X)
/loncom/xml lonxml.pm
Log:
- Backport 1.525.
Index: loncom/xml/lonxml.pm
diff -u loncom/xml/lonxml.pm:1.505.2.6 loncom/xml/lonxml.pm:1.505.2.7
--- loncom/xml/lonxml.pm:1.505.2.6 Tue Nov 15 17:43:20 2011
+++ loncom/xml/lonxml.pm Thu Dec 1 04:41:55 2011
@@ -1,7 +1,7 @@
# The LearningOnline Network with CAPA
# XML Parser Module
#
-# $Id: lonxml.pm,v 1.505.2.6 2011/11/15 17:43:20 raeburn Exp $
+# $Id: lonxml.pm,v 1.505.2.7 2011/12/01 04:41:55 raeburn Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -2145,11 +2145,13 @@
while (my $token = $parser->get_token()) {
if ($token->[0] eq 'S') {
my $key;
- if ($token->[1] eq 'tag') {
+ if ($token->[1] eq 'tag') {
$tag = $token->[2]{'name'};
- $insertlist{$tagnum.'.tag'} = $tag;
- $insertlist{$tag.'.num'} = $tagnum;
- push(@alltags,$tag);
+ if (defined($tag)) {
+ $insertlist{$tagnum.'.tag'} = $tag;
+ $insertlist{$tag.'.num'} = $tagnum;
+ push(@alltags,$tag);
+ }
} elsif ($in_help && $token->[1] eq 'file') {
$key = $tag.'.helpfile';
} elsif ($in_help && $token->[1] eq 'description') {
More information about the LON-CAPA-cvs
mailing list