--- loncom/homework/functionplotresponse.pm 2010/09/27 22:15:32 1.1 +++ loncom/homework/functionplotresponse.pm 2010/10/04 14:34:43 1.2 @@ -1,7 +1,7 @@ # LearningOnline Network with CAPA # option list style responses # -# $Id: functionplotresponse.pm,v 1.1 2010/09/27 22:15:32 www Exp $ +# $Id: functionplotresponse.pm,v 1.2 2010/10/04 14:34:43 www Exp $ # # Copyright Michigan State University Board of Trustees # @@ -45,18 +45,49 @@ ENDSTARTCODE } sub geogebra_endcode { - return "\n\n"; + return &Apache::lonhtmlcommon::java_not_enabled()."\n"; +} + +sub geogebra_spline_program { + return (< +ENDSPLINEPROGRAM +} + +sub geogebra_default_parameters { + return(< + + + + + + + + + + + + + + + + + + + + +ENDDEFAULTPARAMETERS } sub start_functionplotresponse { my ($target,$token,$tagstack,$parstack,$parser,$safeeval,$style)=@_; my $result=''; - #when in a option response use these -# &Apache::lonxml::register('Apache::optionresponse',('foilgroup','foil','conceptgroup','drawoptionlist')); - push (@Apache::lonxml::namespace,'optionresponse'); my $id = &Apache::response::start_response($parstack,$safeeval); if ($target eq 'web') { $result.=&geogebra_startcode(); + $result.=&geogebra_spline_program(); + $result.=&geogebra_default_parameters(); } return $result; } @@ -64,8 +95,6 @@ sub start_functionplotresponse { sub end_functionplotresponse { my ($target,$token,$tagstack,$parstack,$parser,$safeeval,$style)=@_; &Apache::response::end_response; - pop @Apache::lonxml::namespace; -# &Apache::lonxml::deregister('Apache::optionresponse',('foilgroup','foil','conceptgroup','drawoptionlist')); my $result; # if ($target eq 'edit') { $result=&Apache::edit::end_table(); } if ($target eq 'web') {