--- loncom/homework/caparesponse/caparesponse.pm 2003/10/14 22:53:22 1.115 +++ loncom/homework/caparesponse/caparesponse.pm 2003/10/15 19:40:43 1.116 @@ -1,7 +1,7 @@ # The LearningOnline Network with CAPA # caparesponse definition # -# $Id: caparesponse.pm,v 1.115 2003/10/14 22:53:22 albertel Exp $ +# $Id: caparesponse.pm,v 1.116 2003/10/15 19:40:43 albertel Exp $ # # Copyright Michigan State University Board of Trustees # @@ -220,11 +220,16 @@ sub end_numericalresponse { if ($$tagstack[-1] eq 'numericalresponse') { if ($unit=~/\S/) {$result.=' (in '.$unit.')

';} $result.= ''; + my $previous=$Apache::lonhomework::history{"resource.$Apache::inputtags::part.$id.submission"}; for (my $ind=0;$ind<$number_of_bubbles;$ind++) { + my $checked=''; + if ($previous eq $bubble_values[$ind]) { + $checked=" checked='on' "; + } $result.=''; + '" value="'.$bubble_values[$ind].'" '.$checked + .' />'.$alphabet[$ind].': '. + $bubble_values[$ind].''; } $result.='
'. - $alphabet[$ind].': '. - $bubble_values[$ind].'
'; } elsif ($$tagstack[-1] eq 'formularesponse') {