--- loncom/interface/statistics/lonstathelpers.pm 2004/11/08 15:14:52 1.30 +++ loncom/interface/statistics/lonstathelpers.pm 2004/11/10 21:50:29 1.31 @@ -1,6 +1,6 @@ # The LearningOnline Network with CAPA # -# $Id: lonstathelpers.pm,v 1.30 2004/11/08 15:14:52 matthew Exp $ +# $Id: lonstathelpers.pm,v 1.31 2004/11/10 21:50:29 matthew Exp $ # # Copyright Michigan State University Board of Trustees # @@ -555,6 +555,7 @@ Returns: nothing ##################################################### sub GetStudentAnswers { my ($r,$problem,$Students,$formname,$inputname) = @_; + my %answers; my $status_type; if (defined($formname)) { $status_type = 'inline'; @@ -582,6 +583,7 @@ sub GetStudentAnswers { ($resource,$sname,$sdom,$partid,$respid); &Apache::lonhtmlcommon::Increment_PrgWin($r,\%prog_state, &mt('last student')); + $answers{$answer}++; $student->{'answer'} = $answer; } &Apache::lonstathelpers::write_analysis_cache(); @@ -589,7 +591,7 @@ sub GetStudentAnswers { $r->rflush(); # close progress window &Apache::lonhtmlcommon::Close_PrgWin($r,\%prog_state); - return; + return \%answers; } #####################################################