--- loncom/xml/lonxml.pm 2003/05/29 18:42:22 1.260 +++ loncom/xml/lonxml.pm 2003/06/10 18:17:03 1.262 @@ -1,7 +1,7 @@ # The LearningOnline Network with CAPA # XML Parser Module # -# $Id: lonxml.pm,v 1.260 2003/05/29 18:42:22 albertel Exp $ +# $Id: lonxml.pm,v 1.262 2003/06/10 18:17:03 matthew Exp $ # # Copyright Michigan State University Board of Trustees # @@ -501,7 +501,7 @@ sub inner_xmlparse { my $dontpop=0; while ( $#$pars > -1 ) { while ($token = $$pars['-1']->get_token) { - if (($token->[0] eq 'T') || ($token->[0] eq 'C') || ($token->[0] eq 'D') ) { + if (($token->[0] eq 'T') || ($token->[0] eq 'C') ) { if ($metamode<1) { my $text=$token->[1]; if ($token->[0] eq 'C' && $target eq 'tex') { @@ -510,8 +510,13 @@ sub inner_xmlparse { } $result.=$text; } + } elsif (($token->[0] eq 'D')) { + if ($metamode<1 && $target eq 'web') { + my $text=$token->[1]; + $result.=$text; + } } elsif ($token->[0] eq 'PI') { - if ($metamode<1) { + if ($metamode<1 && $target eq 'web') { $result=$token->[2]; } } elsif ($token->[0] eq 'S') { @@ -1320,8 +1325,11 @@ sub error { sub warning { $warningcount++; - if ($ENV{'request.state'} eq 'construct' || $Apache::lonxml::debug) { - print "WARNING:".join('
',@_)."
\n"; + + if ($ENV{'form.grade_target'} ne 'tex') { + if ($ENV{'request.state'} eq 'construct' || $Apache::lonxml::debug) { + print "WARNING:".join('
',@_)."
\n"; + } } } @@ -1430,6 +1438,7 @@ sub description { # calls to lonnet functions for this setup. # - looks for form.grade_ parameters sub whichuser { + my ($passedsymb)=@_; my ($symb,$courseid,$domain,$name,$publicuser); if (defined($ENV{'form.grade_symb'})) { my $tmp_courseid=$ENV{'form.grade_courseid'}; @@ -1441,7 +1450,11 @@ sub whichuser { $name=$ENV{'form.grade_username'}; } } else { - $symb=&Apache::lonnet::symbread(); + if (!$passedsymb) { + $symb=&Apache::lonnet::symbread(); + } else { + $symb=$passedsymb; + } $courseid=$ENV{'request.course.id'}; $domain=$ENV{'user.domain'}; $name=$ENV{'user.name'};