--- loncom/homework/functionplotresponse.pm 2010/11/20 00:14:44 1.42 +++ loncom/homework/functionplotresponse.pm 2010/11/23 17:01:28 1.44 @@ -1,7 +1,7 @@ # LearningOnline Network with CAPA # option list style responses # -# $Id: functionplotresponse.pm,v 1.42 2010/11/20 00:14:44 www Exp $ +# $Id: functionplotresponse.pm,v 1.44 2010/11/23 17:01:28 www Exp $ # # Copyright Michigan State University Board of Trustees # @@ -329,8 +329,8 @@ sub plot_script { $label='C'.$Apache::functionplotresponse::counter; } if ($fixed) { - return "document.ggbApplet_$id.evalCommand('$label=Function[$function,$xmin,$xmax]')". - ($visible?'':"document.ggbApplet.setLabelVisible('$label', false);"); + return "document.ggbApplet_$id.evalCommand('$label=Function[$function,$xmin,$xmax]');\n". + ($visible?'':"document.ggbApplet_$id.setLabelVisible('$label', false);\n"); } else { return "document.ggbApplet_$id.evalCommand('y=$function')"; } @@ -467,18 +467,19 @@ sub start_functionplotrule { ['1','First derivative'], ['2','Second derivative'], ['-1','Integral']],$token).'
'. - &Apache::edit::text_arg('(Initial) x-value:','xinitial', + &Apache::edit::text_arg('Initial x-value:','xinitial', $token,'8'). - &Apache::edit::select_or_text_arg('(Initial) x-value label:','xinitiallabel', - [['start','Start of Plot']],$token,'8').'
'. + &Apache::edit::select_or_text_arg('Initial x-value label:','xinitiallabel', + [['start','Start of Plot'], + ['end','End of Plot']],$token,'8').'
'. - &Apache::edit::text_arg('Optional final x-value for ranges:','xfinal', + &Apache::edit::text_arg('Final x-value (optional):','xfinal', $token,'8'). - &Apache::edit::select_or_text_arg('Optional final x-value label:','xfinallabel', + &Apache::edit::select_or_text_arg('Final x-value label (optional):','xfinallabel', [['end','End of Plot']],$token,'8').'
'. - &Apache::edit::text_arg('Optional minimum length for range:','minimumlength', + &Apache::edit::text_arg('Minimum length for range (optional):','minimumlength', $token,'8'). - &Apache::edit::text_arg('Optional maximum length for range:','maximumlength', + &Apache::edit::text_arg('Maximum length for range (optional):','maximumlength', $token,'8').'
'. &Apache::edit::select_or_text_arg(&mt('Relationship:'),'relationship', [['eq','equal'], @@ -562,7 +563,7 @@ sub start_spline { &Apache::edit::text_arg('Index:','index', $token,'4').' '. &Apache::edit::select_arg('Order:','order', - ['2','3','4','5','6','7','8','9'],$token).' '. + ['2','3','4','5','6','7','8'],$token).' '. &Apache::edit::text_arg('Initial x-value:','initx', $token,'4').' '. &Apache::edit::text_arg('Initial y-value:','inity',