--- loncom/xml/lonplot.pm 2002/02/06 10:24:55 1.48 +++ loncom/xml/lonplot.pm 2002/02/06 10:33:27 1.49 @@ -1,7 +1,7 @@ # The LearningOnline Network with CAPA # Dynamic plot # -# $Id: lonplot.pm,v 1.48 2002/02/06 10:24:55 matthew Exp $ +# $Id: lonplot.pm,v 1.49 2002/02/06 10:33:27 matthew Exp $ # # Copyright Michigan State University Board of Trustees # @@ -29,7 +29,7 @@ # 12/17 12/18 12/19 12/20 12/21 12/27 12/28 12/30 12/31 Matthew # 01/01/02 Matthew # 01/02 01/03 01/04 01/07 01/08 01/09 Matthew -# 01/21 02/05 Matthew +# 01/21 02/05 02/06 Matthew package Apache::lonplot; @@ -564,6 +564,7 @@ sub start_title { my $result=''; if ($target eq 'web') { $title = &Apache::lonxml::get_all_text("/title",$$parser[-1]); + $title =~ s/\n/ /g; if (length($title) > $max_str_len) { $title = substr($title,0,$max_str_len); } @@ -596,6 +597,7 @@ sub start_xlabel { my $result=''; if ($target eq 'web') { $xlabel = &Apache::lonxml::get_all_text("/xlabel",$$parser[-1]); + $xlabel =~ s/\n/ /g; if (length($xlabel) > $max_str_len) { $xlabel = substr($xlabel,0,$max_str_len); } @@ -629,6 +631,7 @@ sub start_ylabel { my $result=''; if ($target eq 'web') { $ylabel = &Apache::lonxml::get_all_text("/ylabel",$$parser[-1]); + $ylabel =~ s/\n/ /g; if (length($ylabel) > $max_str_len) { $ylabel = substr($ylabel,0,$max_str_len); } @@ -665,6 +668,7 @@ sub start_label { &get_attributes(\%label,\%label_defaults,$parstack,$safeeval, $tagstack->[-1]); my $text = &Apache::lonxml::get_all_text("/label",$$parser[-1]); + $text =~ s/\n/ /g; $text = substr($text,0,$max_str_len) if (length($text) > $max_str_len); $label{'text'} = $text; push(@labels,\%label); @@ -785,7 +789,7 @@ sub start_data { $datatext = &Apache::run::run('return "'.$datatext.'"', $safeeval,1); } - $datatext =~ s/\s+/ /g; + $datatext =~ s/\s+/ /g; # Need to do some error checking on the @data array - # make sure it's all numbers and make sure each array # is of the same length.