--- loncom/xml/lonxml.pm 2003/04/03 22:34:26 1.246 +++ loncom/xml/lonxml.pm 2003/04/11 16:03:26 1.248 @@ -1,7 +1,7 @@ # The LearningOnline Network with CAPA # XML Parser Module # -# $Id: lonxml.pm,v 1.246 2003/04/03 22:34:26 albertel Exp $ +# $Id: lonxml.pm,v 1.248 2003/04/11 16:03:26 albertel Exp $ # # Copyright Michigan State University Board of Trustees # @@ -380,8 +380,11 @@ sub printtokenheader { sub fontsettings() { my $headerstring=''; if (($ENV{'browser.os'} eq 'mac') && (!$ENV{'browser.mathml'})) { - $headerstring.= - ''; + $headerstring.= + ''; + } elsif (!$ENV{'browser.mathml'}) { + $headerstring.= + ''; } return $headerstring; } @@ -898,18 +901,23 @@ sub get_all_text_unbalanced { } sub increment_counter { - $Apache::lonxml::counter++; + my ($increment) = @_; + if (defined($increment) && $increment gt 0) { + $Apache::lonxml::counter+=$increment; + } else { + $Apache::lonxml::counter++; + } $Apache::lonxml::counter_changed=1; } sub init_counter { if (defined($ENV{'form.counter'})) { $Apache::lonxml::counter=$ENV{'form.counter'}; + $Apache::lonxml::counter_changed=0; } else { $Apache::lonxml::counter=1; - &store_counter(); + $Apache::lonxml::counter_changed=1; } - $Apache::lonxml::counter_changed=0; } sub store_counter {