Diff for /loncom/interface/statistics/lonstudentassessment.pm between versions 1.101 and 1.102

version 1.101, 2004/05/18 17:43:36 version 1.102, 2004/07/13 15:03:34
Line 607  Return a line of the chart for a student Line 607  Return a line of the chart for a student
   
     my $nodata_count; # The number of students for which there is no data      my $nodata_count; # The number of students for which there is no data
     my %prog_state;   # progress state used by loncommon PrgWin routines      my %prog_state;   # progress state used by loncommon PrgWin routines
       my $total_sum_width;
   
 sub html_initialize {  sub html_initialize {
     my ($r) = @_;      my ($r) = @_;
Line 633  sub html_initialize { Line 634  sub html_initialize {
     }      }
     #      #
     # Compute the column widths and output the sequence titles      # Compute the column widths and output the sequence titles
       my $total_count;
     foreach my $sequence (&Apache::lonstatistics::Sequences_with_Assess()){      foreach my $sequence (&Apache::lonstatistics::Sequences_with_Assess()){
         #          #
         # Comptue column widths          # Comptue column widths
Line 642  sub html_initialize { Line 644  sub html_initialize {
                 # Use 1 digit for a space                  # Use 1 digit for a space
                 $sequence->{'width_sum'} += 1;                              $sequence->{'width_sum'} += 1;            
             }              }
       $total_count += $sequence->{'num_assess_parts'};
             # Use 3 digits for the sum              # Use 3 digits for the sum
             $sequence->{'width_sum'} += 3;              $sequence->{'width_sum'} += 3;
         }          }
Line 672  sub html_initialize { Line 675  sub html_initialize {
                                       length($sequence->{'title'})                                        length($sequence->{'title'})
                                       ).$padding;                                        ).$padding;
     }      }
     $Str .= "total</pre>\n";      $total_sum_width = length($total_count)+1;
       $Str .= "    total</pre>\n";
     $Str .= "<pre>";      $Str .= "<pre>";
     $r->print($Str);      $r->print($Str);
     $r->rflush();      $r->rflush();
Line 767  sub html_outputstudent { Line 771  sub html_outputstudent {
         $max   += $seq_stats->{'max'};          $max   += $seq_stats->{'max'};
     }      }
     if (! defined($score)) {      if (! defined($score)) {
         $score = ' 'x3;          $score = ' ' x $total_sum_width;
     }      }
     $Str .= ' '.' 'x(length($max)-length($score)).$score.'/'.$max;      $Str .= ' '.' 'x($total_sum_width-length($score)).$score.' / '.$max;
     $Str .= " \n";      $Str .= " \n";
     #      #
     $r->print($Str);      $r->print($Str);

Removed from v.1.101  
changed lines
  Added in v.1.102


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