--- loncom/homework/imageresponse.pm 2007/09/25 23:58:32 1.88 +++ loncom/homework/imageresponse.pm 2007/10/08 09:22:50 1.89 @@ -1,8 +1,8 @@ - +# # The LearningOnline Network with CAPA # image click response style # -# $Id: imageresponse.pm,v 1.88 2007/09/25 23:58:32 albertel Exp $ +# $Id: imageresponse.pm,v 1.89 2007/10/08 09:22:50 foxr Exp $ # # Copyright Michigan State University Board of Trustees # @@ -79,6 +79,8 @@ sub start_imageresponse { sub end_imageresponse { my ($target,$token,$tagstack,$parstack,$parser,$safeeval,$style)=@_; + my $part_id = $Apache::inputtags::part; + pop(@Apache::lonxml::namespace); &Apache::lonxml::deregister('Apache::imageresponse',('foilgroup','foil','text','image','rectangle','conceptgroup')); @@ -94,7 +96,12 @@ sub end_imageresponse { if ($target eq 'grade' || $target eq 'web' || $target eq 'answer' || $target eq 'tex' || $target eq 'analyze') { - &Apache::lonxml::increment_counter(&Apache::response::repetition()); + &Apache::lonxml::increment_counter(&Apache::response::repetition(), + $part_id); + if ($target eq 'analyze') { + &Apache::lonhomework::set_bubble_lines(); + } + } &Apache::response::end_response();