--- loncom/homework/caparesponse/caparesponse.pm 2003/11/20 22:06:39 1.122 +++ loncom/homework/caparesponse/caparesponse.pm 2003/11/21 19:15:12 1.123 @@ -1,7 +1,7 @@ # The LearningOnline Network with CAPA # caparesponse definition # -# $Id: caparesponse.pm,v 1.122 2003/11/20 22:06:39 albertel Exp $ +# $Id: caparesponse.pm,v 1.123 2003/11/21 19:15:12 albertel Exp $ # # Copyright Michigan State University Board of Trustees # @@ -128,15 +128,24 @@ sub end_numericalresponse { my $expression="&caparesponse_check_list('".$response."','". $$parstack[-1]; my $hideunit=&Apache::lonnet::EXT('resource.'.$partid.'_'.$id.'.turnoffunit'); + + foreach my $key (keys(%Apache::inputtags::params)) { + $expression.= ';my $'. #' + $key.'="'.$Apache::inputtags::params{$key}.'"'; + } + #no way to enter units, with radio buttons if ($Apache::lonhomework::type eq 'exam' || lc($hideunit) eq "yes") { $expression.=';my $unit=undef;'; } - foreach my $key (keys(%Apache::inputtags::params)) { - $expression.= ';my $'. #' - $key.'="'.$Apache::inputtags::params{$key}.'"'; + #sig fig don't make much sense either + if (($Apache::lonhomework::type eq 'exam' || + $ENV{'form.submitted'} eq 'scantron') && + $$tagstack[-1] eq 'numericalresponse') { + $expression.=';my $sig=undef;'; } + if ($$tagstack[-1] eq 'formularesponse') { $expression.=';my $type="fml";'; } elsif ($$tagstack[-1] eq 'numericalresponse') {