Diff for /loncom/homework/functionplotresponse.pm between versions 1.67 and 1.68

version 1.67, 2011/10/19 00:20:28 version 1.68, 2011/10/19 13:21:51
Line 164  sub update_register { Line 164  sub update_register {
 sub set_point_coordinate {  sub set_point_coordinate {
    my ($id,$variable,$x,$y,$fixed)=@_;     my ($id,$variable,$x,$y,$fixed)=@_;
    my $mult=($fixed?'a*':'');     my $mult=($fixed?'a*':'');
   # Get rid of wild exponents, make sure it's a number
      $x=1.*$x;
      $y=1.*$y;
   # GeoGebra does not understand "E"
      $x=~s/[e|E]/\*10\^/;
      $x=~s/\+//;
      $y=~s/[e|E]/\*10\^/;
      $y=~s/\+//;
    return (<<ENDSETVARIABLE);     return (<<ENDSETVARIABLE);
 document.ggbApplet_$id.evalCommand("a=1");  document.ggbApplet_$id.evalCommand("a=1");
 document.ggbApplet_$id.evalCommand("$variable=$mult($x,$y)");  document.ggbApplet_$id.evalCommand("$variable=$mult($x,$y)");

Removed from v.1.67  
changed lines
  Added in v.1.68


FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>