Diff for /loncom/interface/statistics/lonstudentassessment.pm between versions 1.125 and 1.127

version 1.125, 2005/08/26 21:53:23 version 1.127, 2006/01/22 21:11:59
Line 1144  sub excel_initialize { Line 1144  sub excel_initialize {
             ! defined($formula_data{$symb}->{'Excel:endcell'})) {              ! defined($formula_data{$symb}->{'Excel:endcell'})) {
             $formula_data{$symb}->{'Excel:endcell'} = $formula_data{$symb}->{'Excel:startcell'};              $formula_data{$symb}->{'Excel:endcell'} = $formula_data{$symb}->{'Excel:startcell'};
         }          }
           # =IF(COUNT(B31:L31);SUM(B31:L31);"")
           my $start = $formula_data{$symb}->{'Excel:startcell'};
           my $end = $formula_data{$symb}->{'Excel:endcell'};
         $formula_data{$symb}->{'Excel:sum'}= $excel_sheet->store_formula          $formula_data{$symb}->{'Excel:sum'}= $excel_sheet->store_formula
             ('=SUM('.$formula_data{$symb}->{'Excel:startcell'}.              ("=IF(COUNT($start\:$end),SUM($start\:$end),\"\")");
              ':'.$formula_data{$symb}->{'Excel:endcell'}.')');  
         # Determine cell the score is held in          # Determine cell the score is held in
         $formula_data{$symb}->{'Excel:scorecell'} =           $formula_data{$symb}->{'Excel:scorecell'} = 
             &Spreadsheet::WriteExcel::Utility::xl_rowcol_to_cell              &Spreadsheet::WriteExcel::Utility::xl_rowcol_to_cell
Line 1255  sub excel_initialize { Line 1257  sub excel_initialize {
      &Spreadsheet::WriteExcel::Utility::xl_rowcol_to_cell($maximum_data_row,$formula_data{$symb}->{'Excel:endcol'}));       &Spreadsheet::WriteExcel::Utility::xl_rowcol_to_cell($maximum_data_row,$formula_data{$symb}->{'Excel:endcol'}));
                 $excel_sheet->repeat_formula($maximum_data_row,$cols_output++,                  $excel_sheet->repeat_formula($maximum_data_row,$cols_output++,
                                              $formula_data{$symb}->{'Excel:sum'},undef,                                               $formula_data{$symb}->{'Excel:sum'},undef,
      %replaceCells);       %replaceCells, %replaceCells);
   
             } elsif ($chosen_output->{'sequence_sum'}) {              } elsif ($chosen_output->{'sequence_sum'}) {
                 $excel_sheet->write($maximum_data_row,$cols_output++,$max);                  $excel_sheet->write($maximum_data_row,$cols_output++,$max);
Line 1411  sub excel_outputstudent { Line 1413  sub excel_outputstudent {
             if ($chosen_output->{'correct'}) {              if ($chosen_output->{'correct'}) {
                 # only indiciate if each item is correct or not                  # only indiciate if each item is correct or not
                 foreach my $value (@$rawdata) {                  foreach my $value (@$rawdata) {
                     # nonzero means correct                      # positive means correct, 0 or negative means
                     $value = 1 if ($value > 0);                      # incorrect
                       $value = $value > 0 ? 1 : 0;
                     $excel_sheet->write($rows_output,$cols_output++,$value);                      $excel_sheet->write($rows_output,$cols_output++,$value);
                 }                  }
             } else {              } else {
Line 1438  sub excel_outputstudent { Line 1441  sub excel_outputstudent {
             # The undef is for the format                  # The undef is for the format    
     $excel_sheet->repeat_formula($rows_output,$cols_output++,      $excel_sheet->repeat_formula($rows_output,$cols_output++,
  $formula_data{$symb}->{'Excel:sum'},undef,   $formula_data{$symb}->{'Excel:sum'},undef,
  %replaceCells);   %replaceCells, %replaceCells);
         } elsif ($chosen_output->{'sequence_sum'}) {          } elsif ($chosen_output->{'sequence_sum'}) {
             if ($score eq ' ') {              if ($score eq ' ') {
                 $cols_output++;                  $cols_output++;

Removed from v.1.125  
changed lines
  Added in v.1.127


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