--- loncom/homework/functionplotresponse.pm 2011/04/04 21:27:30 1.60
+++ loncom/homework/functionplotresponse.pm 2011/05/27 23:00:58 1.63
@@ -1,7 +1,7 @@
# LearningOnline Network with CAPA
# option list style responses
#
-# $Id: functionplotresponse.pm,v 1.60 2011/04/04 21:27:30 www Exp $
+# $Id: functionplotresponse.pm,v 1.63 2011/05/27 23:00:58 raeburn Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -74,8 +74,8 @@ sub geogebra_default_parameters {
-
-
+
+
@@ -388,10 +388,10 @@ sub answer_spline_script {
$output=~s/\,$//;
$output.=']");'."\n";
for (my $i=2; $i<2*$order; $i+=2) {
- $output.='document.ggbApplet_'.$id.'.setColor("'.$label.'_'.$i.'",0,170,0);'."\n";
+ $output.='document.ggbApplet_'.$id.'.setColor("'.$label.'_'.($i>=10?'{':'').$i.($i>=10?'}':'').'",0,170,0);'."\n";
}
for (my $i=1; $i<2*$order; $i+=2) {
- $output.='document.ggbApplet_'.$id.'.setVisible("'.$label.'_'.$i.'",false);'."\n";
+ $output.='document.ggbApplet_'.$id.'.setVisible("'.$label.'_'.($i>=10?'{':'').$i.($i>=10?'}':'').'",false);'."\n";
}
return $output;
@@ -880,8 +880,7 @@ sub start_functionplotresponse {
&Apache::edit::select_arg('Grid visible:','gridvisible',
['yes','no'],$token).'
'.
&Apache::edit::text_arg('Background plot(s) for answer (function(x):xmin:xmax,function(x):xmin:xmax,x1:y1:sx1:sy1:x2:y2:sx2:sy2,...):',
- 'answerdisplay',$token,'50');
-
+ 'answerdisplay',$token,'50').
&Apache::edit::end_row().&Apache::edit::start_spanning_row();
} elsif ($target eq 'modified') {
my $constructtag=&Apache::edit::get_new_args($token,$parstack,