Diff for /loncom/interface/statistics/lonproblemstatistics.pm between versions 1.84 and 1.86

version 1.84, 2004/04/16 21:43:56 version 1.86, 2004/05/18 18:12:19
Line 96  my %SeqStat;    # keys are symbs, values Line 96  my %SeqStat;    # keys are symbs, values
 ##                                      statistics display?  ##                                      statistics display?
 ## selected        yes     (yes|no)     Is the column selected by default?  ## selected        yes     (yes|no)     Is the column selected by default?
 ##  ##
   ## format          no      sprintf format string
   ##
   ## excel_format    no      excel format type 
   ##                               (see &Apache::loncommon::define_excel_formats
 my @Fields = (  my @Fields = (
            { name => 'problem_num',             { name => 'problem_num',
              title => 'P#',               title => 'P#',
Line 261  my @Fields = ( Line 265  my @Fields = (
              selectable => 'yes',               selectable => 'yes',
              defaultselected => 'no',               defaultselected => 'no',
            },             },
   ##   duedate included for research purposes.  Commented out most of the time.
   #           { name => 'duedate',
   #             title => 'Due Date',
   #             align => 'left',
   #             color => '#FFFFFF',
   #             sortable => 'yes',
   #             graphable => 'no',
   #             long_title => 'Due date of resource for instructor',
   #             selectable => 'no',
   #             defaultselected => 'yes',
   #            },
   ##   opendate included for research purposes.  Commented out most of the time.
   #           { name => 'opendate',
   #             title => 'Open Date',
   #             align => 'left',
   #             color => '#FFFFFF',
   #             sortable => 'yes',
   #             graphable => 'no',
   #             long_title => 'date resource became answerable',
   #             selectable => 'no',
   #             defaultselected => 'yes',
   #            },
   ##   symb included for research purposes.  Commented out most of the time.
   #           { name => 'symb',
   #             title => 'Symb',
   #             align => 'left',
   #             color => '#FFFFFF',
   #             sortable => 'yes',
   #             graphable => 'no',
   #             long_title => 'Unique LON-CAPA identifier for problem',
   #             selectable => 'no',
   #             defaultselected => 'yes',
   #            },
   ##   resptypes included for research purposes.  Commented out most of the time.
   #           { name => 'resptypes',
   #             title => 'Response Types',
   #             align => 'left',
   #             color => '#FFFFFF',
   #             sortable => 'no',
   #             graphable => 'no',
   #             long_title => 'Response Types used in this problem',
   #             selectable => 'no',
   #             defaultselected => 'yes',
   #            },
 );  );
   
 my @SeqFields = (  my @SeqFields = (
Line 1241  sub Excel_output { Line 1289  sub Excel_output {
         $cols_output=0;          $cols_output=0;
         foreach my $field (@SeqFields) {          foreach my $field (@SeqFields) {
             next if ($field->{'selected'} ne 'yes');              next if ($field->{'selected'} ne 'yes');
               my $fieldformat = undef;
               if (exists($field->{'excel_format'})) {
                   $fieldformat = $format->{$field->{'excel_format'}};
               }
             $excel_sheet->write($rows_output,$cols_output++,              $excel_sheet->write($rows_output,$cols_output++,
                                 $data->{$field->{'name'}});                                  $data->{$field->{'name'}},$fieldformat);
         }          }
         $rows_output++;          $rows_output++;
         $cols_output=0;          $cols_output=0;
Line 1260  sub Excel_output { Line 1312  sub Excel_output {
         foreach my $field (@Fields) {          foreach my $field (@Fields) {
             next if ($field->{'selected'} ne 'yes');              next if ($field->{'selected'} ne 'yes');
             next if ($field->{'name'} eq 'problem_num');              next if ($field->{'name'} eq 'problem_num');
               my $fieldformat = undef;
               if (exists($field->{'excel_format'})) {
                   $fieldformat = $format->{$field->{'excel_format'}};
               }
             $excel_sheet->write($rows_output,$cols_output++,              $excel_sheet->write($rows_output,$cols_output++,
                                 $data->{$field->{'name'}});                                  $data->{$field->{'name'}},$fieldformat);
         }          }
         $rows_output++;          $rows_output++;
         $cols_output=0;          $cols_output=0;
Line 1441  sub get_statistics { Line 1497  sub get_statistics {
                         (\@Apache::lonstatistics::SelectedSections,                          (\@Apache::lonstatistics::SelectedSections,
                          $Apache::lonstatistics::enrollment_status,                           $Apache::lonstatistics::enrollment_status,
                          $symb,$part,$courseid,$starttime,$endtime);                           $symb,$part,$courseid,$starttime,$endtime);
       $data->{'symb'}        = $symb;
     $data->{'part'}        = $part;      $data->{'part'}        = $part;
     $data->{'problem_num'} = $problem_num;      $data->{'problem_num'} = $problem_num;
     $data->{'container'}   = $sequence->{'title'};      $data->{'container'}   = $sequence->{'title'};
Line 1467  sub get_statistics { Line 1524  sub get_statistics {
         my ($dom,$user) = $urlres=~/^(\w+)\/(\w+)/;           my ($dom,$user) = $urlres=~/^(\w+)\/(\w+)/; 
         &Apache::lonnet::put('nohist_resevaldata',\%storestats,$dom,$user);          &Apache::lonnet::put('nohist_resevaldata',\%storestats,$dom,$user);
     }      }
       #
       # Get the due date for research purposes (commented out most of the time)
   #    $data->{'duedate'} = 
   #        &Apache::lonnet::EXT('resource.'.$part.'.duedate',$symb);
   #    $data->{'opendate'} = 
   #        &Apache::lonnet::EXT('resource.'.$part.'.opendate',$symb);
   #    $data->{'resptypes'} = join(',',@{$resource->{'partdata'}->{$part}->{'ResponseTypes'}});
     return $data;      return $data;
 }  }
   

Removed from v.1.84  
changed lines
  Added in v.1.86


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