[LON-CAPA-cvs] cvs: loncom /homework functionplotresponse.pm
www
www@source.lon-capa.org
Mon, 04 Apr 2011 21:27:30 -0000
www Mon Apr 4 21:27:30 2011 EDT
Modified files:
/loncom/homework functionplotresponse.pm
Log:
Answer splines are green and don't show their arrows.
Index: loncom/homework/functionplotresponse.pm
diff -u loncom/homework/functionplotresponse.pm:1.59 loncom/homework/functionplotresponse.pm:1.60
--- loncom/homework/functionplotresponse.pm:1.59 Mon Apr 4 21:06:46 2011
+++ loncom/homework/functionplotresponse.pm Mon Apr 4 21:27:30 2011
@@ -1,7 +1,7 @@
# LearningOnline Network with CAPA
# option list style responses
#
-# $Id: functionplotresponse.pm,v 1.59 2011/04/04 21:06:46 www Exp $
+# $Id: functionplotresponse.pm,v 1.60 2011/04/04 21:27:30 www Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -380,7 +380,7 @@
if ($order<2) { $order=2; }
if ($order>8) { $order=8; }
$Apache::functionplotresponse::counter++;
- my $label='C'.$Apache::functionplotresponse::counter;
+ my $label='CSpline'.$Apache::functionplotresponse::counter;
my $output='document.ggbApplet_'.$id.'.evalCommand("'.$label.'=Spline'.$order.'[';
for (my $i=0;$i<=$#points;$i+=4) {
$output.="($points[$i],$points[$i+1]),($points[$i+2],$points[$i+3]),";
@@ -390,6 +390,10 @@
for (my $i=2; $i<2*$order; $i+=2) {
$output.='document.ggbApplet_'.$id.'.setColor("'.$label.'_'.$i.'",0,170,0);'."\n";
}
+ for (my $i=1; $i<2*$order; $i+=2) {
+ $output.='document.ggbApplet_'.$id.'.setVisible("'.$label.'_'.$i.'",false);'."\n";
+ }
+
return $output;
}