--- loncom/homework/caparesponse/caparesponse.pm 2004/02/19 21:49:33 1.132 +++ loncom/homework/caparesponse/caparesponse.pm 2004/02/20 18:04:43 1.133 @@ -1,7 +1,7 @@ # The LearningOnline Network with CAPA # caparesponse definition # -# $Id: caparesponse.pm,v 1.132 2004/02/19 21:49:33 sakharuk Exp $ +# $Id: caparesponse.pm,v 1.133 2004/02/20 18:04:43 albertel Exp $ # # Copyright Michigan State University Board of Trustees # @@ -514,6 +514,16 @@ sub get_sigrange { } if (!$sig_ubound) { $sig_ubound=$sig_lbound; } } + if (($sig_ubound<$sig_lbound) || + ($sig_lbound > 15) || + ($sig =~/(\+|-)/ ) ) { + my $errormsg=&mt("Invalid Significant figures detected")." ($sig)"; + if ($ENV{'request.state'} eq 'construct') { + $errormsg.= + &Apache::loncommon::help_open_topic('Significant_Figures'); + } + &Apache::lonxml::error($errormsg); + } return ($sig_ubound,$sig_lbound); }