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

version 1.122.2.4, 2018/03/07 13:32:56 version 1.128, 2018/03/07 12:24:27
Line 52  package Apache::lonproblemstatistics; Line 52  package Apache::lonproblemstatistics;
 use strict;  use strict;
 use Apache::lonnet;  use Apache::lonnet;
 use Apache::loncommon();  use Apache::loncommon();
   use Apache::lonquickgrades();
 use Apache::lonhtmlcommon;  use Apache::lonhtmlcommon;
 use Apache::loncoursedata;  use Apache::loncoursedata;
 use Apache::lonstatistics;  use Apache::lonstatistics;
Line 589  sub field_selection_input { Line 590  sub field_selection_input {
     $Str .= '<option value="all">'.&mt('all').'</option>'."\n";      $Str .= '<option value="all">'.&mt('all').'</option>'."\n";
     foreach my $field (@Fields) {      foreach my $field (@Fields) {
         next if ($field->{'selectable'} ne 'yes');          next if ($field->{'selectable'} ne 'yes');
         $Str .= '    <option value="'.$field->{'name'}.'"';          $Str .= '    <option value="'.$field->{'name'}.'" ';
         if ($field->{'selected'} eq 'yes') {          if ($field->{'selected'} eq 'yes') {
             $Str .= ' selected="selected"';              $Str .= 'selected="selected" ';
         }          }
         $Str .= '>'.&mt($field->{'title'}).'</option>'."\n";          $Str .= '>'.&mt($field->{'title'}).'</option>'."\n";
     }      }
Line 704  sub BuildProblemStatisticsPage { Line 705  sub BuildProblemStatisticsPage {
     # Finally let the user know we are here      # Finally let the user know we are here
     $r->print(&Apache::lonhtmlcommon::breadcrumbs('Overall Problem Statistics',      $r->print(&Apache::lonhtmlcommon::breadcrumbs('Overall Problem Statistics',
                                                 'Statistics_Overall_Key'));                                                  'Statistics_Overall_Key'));
       &Apache::lonquickgrades::startGradeScreen($r,'statistics');
   
     my $interface = &CreateInterface($r);      my $interface = &CreateInterface($r);
     $r->print($interface);      $r->print($interface);
Line 757  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 1467  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 1646  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 1712  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.122.2.4  
changed lines
  Added in v.1.128


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