--- loncom/interface/statistics/lonproblemstatistics.pm 2004/07/12 19:30:12 1.90 +++ loncom/interface/statistics/lonproblemstatistics.pm 2004/07/22 15:56:41 1.91 @@ -1,6 +1,6 @@ # The LearningOnline Network with CAPA # -# $Id: lonproblemstatistics.pm,v 1.90 2004/07/12 19:30:12 matthew Exp $ +# $Id: lonproblemstatistics.pm,v 1.91 2004/07/22 15:56:41 matthew Exp $ # # Copyright Michigan State University Board of Trustees # @@ -1581,6 +1581,10 @@ sub compute_discrimination_factor { map { $_->[&Apache::loncoursedata::RNK_student()]; } @{$ranking}[($num_students-$number_to_grab)..($num_students-1)]; + if (! @BottomSet || (@BottomSet == 1 && $BottomSet[0] eq '') || + ! @TopSet || (@TopSet == 1 && $TopSet[0] eq '')) { + return 'nan'; + } my ($bottom_sum,$bottom_max) = &Apache::loncoursedata::get_sum_of_scores($resource,$part,\@BottomSet, undef,$starttime,$endtime);