Diff for /loncom/interface/statistics/lonproblemstatistics.pm between versions 1.126 and 1.128

version 1.126, 2014/02/28 19:20:17 version 1.128, 2018/03/07 12:24:27
Line 759  sub BuildProblemStatisticsPage { Line 759  sub BuildProblemStatisticsPage {
                   &Apache::lonstatistics::section_and_enrollment_description().                    &Apache::lonstatistics::section_and_enrollment_description().
                   '</p>');                    '</p>');
         my $count = 0;          my $count = 0;
           my $include_tools = 1;
         foreach my $seq (@sequences) {          foreach my $seq (@sequences) {
             my @resources =              my @resources =
                 &Apache::lonstathelpers::get_resources($navmap,$seq);                  &Apache::lonstathelpers::get_resources($navmap,$seq,$include_tools);
             $count += scalar(@resources);              $count += scalar(@resources);
         }          }
         if ($count > 10) {          if ($count > 10) {
Line 1469  sub write_headers { Line 1470  sub write_headers {
 ##################################################  ##################################################
 sub compute_statistics_on_sequence {  sub compute_statistics_on_sequence {
     my ($seq) = @_;      my ($seq) = @_;
       my $include_tools = 1;
     my @Data;      my @Data;
     foreach my $res (&Apache::lonstathelpers::get_resources($navmap,$seq)) {      foreach my $res (&Apache::lonstathelpers::get_resources($navmap,$seq,$include_tools)) {
         foreach my $part (@{$res->parts}) {          foreach my $part (@{$res->parts}) {
             next if (($res->is_survey($part)) || ($res->is_anonsurvey($part))) ;              next if (($res->is_survey($part)) || ($res->is_anonsurvey($part))) ;
             #              #
Line 1648  Returns: integer between -1 and 1 Line 1650  Returns: integer between -1 and 1
 ###############################################  ###############################################
 sub compute_discrimination_factor {  sub compute_discrimination_factor {
     my ($resource,$part,$seq) = @_;      my ($resource,$part,$seq) = @_;
       my $include_tools = 1;
     my $symb = $resource->symb;      my $symb = $resource->symb;
     my @Resources;      my @Resources;
     foreach my $res (&Apache::lonstathelpers::get_resources($navmap,$seq)){      foreach my $res (&Apache::lonstathelpers::get_resources($navmap,$seq,$include_tools)){
         next if ($res->symb eq $symb);          next if ($res->symb eq $symb);
         push (@Resources,$res->symb);          push (@Resources,$res->symb);
     }      }
Line 1669  sub compute_discrimination_factor { Line 1672  sub compute_discrimination_factor {
     my $number_to_grab = int(scalar(@{$ranking})/4);      my $number_to_grab = int(scalar(@{$ranking})/4);
     my $num_students = scalar(@{$ranking});      my $num_students = scalar(@{$ranking});
     my @BottomSet = map { $_->[&Apache::loncoursedata::RNK_student()];      my @BottomSet = map { $_->[&Apache::loncoursedata::RNK_student()];
                       } @{$ranking}[0..$number_to_grab];                        } @{$ranking}[0..$number_to_grab-1];
     my @TopSet    =      my @TopSet    =
         map {          map {
             $_->[&Apache::loncoursedata::RNK_student()];              $_->[&Apache::loncoursedata::RNK_student()];
           } @{$ranking}[-$number_to_grab..0];            } @{$ranking}[-$number_to_grab..-1];
     if (! @BottomSet || (@BottomSet == 1 && $BottomSet[0] eq '') ||      if (! @BottomSet || (@BottomSet == 1 && $BottomSet[0] eq '') ||
         ! @TopSet    || (@TopSet    == 1 && $TopSet[0]    eq '')) {          ! @TopSet    || (@TopSet    == 1 && $TopSet[0]    eq '')) {
         return 'nan';          return 'nan';
Line 1714  sub compute_discrimination_factor { Line 1717  sub compute_discrimination_factor {
 ###############################################  ###############################################
 sub compute_sequence_statistics {  sub compute_sequence_statistics {
     my ($seq) = @_;      my ($seq) = @_;
       my $include_tools = 1;
     my $symb = $seq->symb;      my $symb = $seq->symb;
     my @Resources;      my @Resources;
     my $part_count;      my $part_count;
     foreach my $res (&Apache::lonstathelpers::get_resources($navmap,$seq)) {      foreach my $res (&Apache::lonstathelpers::get_resources($navmap,$seq,$include_tools)) {
         push (@Resources,$res->symb);          push (@Resources,$res->symb);
         $part_count += scalar(@{$res->parts});          $part_count += scalar(@{$res->parts});
     }      }

Removed from v.1.126  
changed lines
  Added in v.1.128


FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>