--- loncom/homework/functionplotresponse.pm 2010/10/28 00:27:56 1.16 +++ loncom/homework/functionplotresponse.pm 2010/10/29 19:18:48 1.17 @@ -1,7 +1,7 @@ # LearningOnline Network with CAPA # option list style responses # -# $Id: functionplotresponse.pm,v 1.16 2010/10/28 00:27:56 www Exp $ +# $Id: functionplotresponse.pm,v 1.17 2010/10/29 19:18:48 www Exp $ # # Copyright Michigan State University Board of Trustees # @@ -107,7 +107,7 @@ sub init_script { $script.="if (param=='applet_$id') { loaded_$id=true; }\n"; } $script.="if (".join(' && ',map { "loaded_$_" } (@Apache::functionplotresponse::callscripts)). - ") { setTimeout('ggbInitAll()',20) }\n"; + ") { setTimeout('ggbInitAll()',20) }"; my $calls=join("\n",map { "ggbInit_$_();" } (@Apache::functionplotresponse::callscripts)); return (< @@ -119,7 +119,7 @@ function ggbOnInit(param) { $script } function ggbInitAll() { -$calls; +$calls } // ]]> @@ -625,6 +625,13 @@ sub end_functionplotresponse { } # close the init script $result.=&end_init_script(); +# register all splines in this response + $result.=''."\n"; + foreach my $label (keys(%Apache::functionplotresponse::splineorder)) { + $result.=''."\n"; + } # generate the input fields $result.=$Apache::functionplotresponse::inputfields; # actually start the -tag