--- loncom/homework/lonhomework.pm 2007/10/05 18:08:40 1.275 +++ loncom/homework/lonhomework.pm 2007/10/08 09:22:50 1.276 @@ -1,7 +1,7 @@ # The LearningOnline Network with CAPA # The LON-CAPA Homework handler # -# $Id: lonhomework.pm,v 1.275 2007/10/05 18:08:40 albertel Exp $ +# $Id: lonhomework.pm,v 1.276 2007/10/08 09:22:50 foxr Exp $ # # Copyright Michigan State University Board of Trustees # @@ -63,6 +63,28 @@ BEGIN { } +=pod + +=item set_bubble_lines() + +Called at analysis time to set the bubble lines +hash for the problem.. This should be called in the +end_problemtype tag in analysis mode. + +We fetch the hash of part id counters from lonxml + and push them into analyze:{part_id.bubble_lines}. + +=cut + +sub set_bubble_lines { + my %bubble_counters = &Apache::lonxml::get_bubble_line_hash(); + + foreach my $key (keys(%bubble_counters)) { + $Apache::lonhomework::analyze{"$key.bubble_lines"} = + $bubble_counters{"$key"}; + } +} + # # Decides what targets to render for. # Implicit inputs: