[LON-CAPA-cvs] cvs: loncom /interface/statistics lonproblemstatistics.pm
raeburn
raeburn at source.lon-capa.org
Wed Mar 7 07:24:27 EST 2018
raeburn Wed Mar 7 12:24:27 2018 EDT
Modified files:
/loncom/interface/statistics lonproblemstatistics.pm
Log:
- Fix ranges used in array slices to generate @BottomSet and @TopSet used
to compute degree of discrimination.
Index: loncom/interface/statistics/lonproblemstatistics.pm
diff -u loncom/interface/statistics/lonproblemstatistics.pm:1.127 loncom/interface/statistics/lonproblemstatistics.pm:1.128
--- loncom/interface/statistics/lonproblemstatistics.pm:1.127 Mon Dec 18 23:51:19 2017
+++ loncom/interface/statistics/lonproblemstatistics.pm Wed Mar 7 12:24:27 2018
@@ -1,6 +1,6 @@
# The LearningOnline Network with CAPA
#
-# $Id: lonproblemstatistics.pm,v 1.127 2017/12/18 23:51:19 raeburn Exp $
+# $Id: lonproblemstatistics.pm,v 1.128 2018/03/07 12:24:27 raeburn Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -1672,11 +1672,11 @@
my $number_to_grab = int(scalar(@{$ranking})/4);
my $num_students = scalar(@{$ranking});
my @BottomSet = map { $_->[&Apache::loncoursedata::RNK_student()];
- } @{$ranking}[0..$number_to_grab];
+ } @{$ranking}[0..$number_to_grab-1];
my @TopSet =
map {
$_->[&Apache::loncoursedata::RNK_student()];
- } @{$ranking}[-$number_to_grab..0];
+ } @{$ranking}[-$number_to_grab..-1];
if (! @BottomSet || (@BottomSet == 1 && $BottomSet[0] eq '') ||
! @TopSet || (@TopSet == 1 && $TopSet[0] eq '')) {
return 'nan';
More information about the LON-CAPA-cvs
mailing list