[LON-CAPA-cvs] cvs: loncom /xml lonplot.pm

www lon-capa-cvs-allow@mail.lon-capa.org
Tue, 10 Jun 2008 12:48:30 -0000


www		Tue Jun 10 08:48:30 2008 EDT

  Modified files:              
    /loncom/xml	lonplot.pm 
  Log:
  All other function syntaxes (TeX, MAXIMA, CAPA-parser) use "^"
  
  
Index: loncom/xml/lonplot.pm
diff -u loncom/xml/lonplot.pm:1.146 loncom/xml/lonplot.pm:1.147
--- loncom/xml/lonplot.pm:1.146	Mon Jun  9 06:07:01 2008
+++ loncom/xml/lonplot.pm	Tue Jun 10 08:48:30 2008
@@ -1,7 +1,7 @@
 # The LearningOnline Network with CAPA
 # Dynamic plot
 #
-# $Id: lonplot.pm,v 1.146 2008/06/09 10:07:01 foxr Exp $
+# $Id: lonplot.pm,v 1.147 2008/06/10 12:48:30 www Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -1362,6 +1362,7 @@
         my $function = &Apache::lonxml::get_all_text("/function",$parser,
 						     $style);
 	$function = &Apache::run::evaluate($function,$safeeval,$$parstack[-1]);
+        $function=~s/\^/\*\*/gs;
 	$curves[-1]->{'function'} = $function; 
     } elsif ($target eq 'edit') {
 	$result .= &Apache::edit::tag_start($target,$token,'Gnuplot compatible curve function');