--- loncom/homework/functionplotresponse.pm 2010/10/09 17:43:25 1.10 +++ loncom/homework/functionplotresponse.pm 2010/10/09 20:02:02 1.11 @@ -1,7 +1,7 @@ # LearningOnline Network with CAPA # option list style responses # -# $Id: functionplotresponse.pm,v 1.10 2010/10/09 17:43:25 www Exp $ +# $Id: functionplotresponse.pm,v 1.11 2010/10/09 20:02:02 www Exp $ # # Copyright Michigan State University Board of Trustees # @@ -178,10 +178,10 @@ sub generate_input_field { # sub new_coordinate { my ($id,$variable,$x,$y)=@_; - if ($Apache::functionplotresponse::previous{&field_name($id,$variable,'x')}) { + if (defined($Apache::functionplotresponse::previous{&field_name($id,$variable,'x')})) { $x=$Apache::functionplotresponse::previous{&field_name($id,$variable,'x')}; } - if ($Apache::functionplotresponse::previous{&field_name($id,$variable,'y')}) { + if (defined($Apache::functionplotresponse::previous{&field_name($id,$variable,'y')})) { $y=$Apache::functionplotresponse::previous{&field_name($id,$variable,'y')}; } &generate_input_field($id,$variable,$x,$y);