--- loncom/interface/statistics/lonstudentassessment.pm 2004/05/18 17:43:36 1.101 +++ loncom/interface/statistics/lonstudentassessment.pm 2004/07/13 15:03:34 1.102 @@ -1,6 +1,6 @@ # The LearningOnline Network with CAPA # -# $Id: lonstudentassessment.pm,v 1.101 2004/05/18 17:43:36 matthew Exp $ +# $Id: lonstudentassessment.pm,v 1.102 2004/07/13 15:03:34 matthew Exp $ # # Copyright Michigan State University Board of Trustees # @@ -607,6 +607,7 @@ Return a line of the chart for a student my $nodata_count; # The number of students for which there is no data my %prog_state; # progress state used by loncommon PrgWin routines + my $total_sum_width; sub html_initialize { my ($r) = @_; @@ -633,6 +634,7 @@ sub html_initialize { } # # Compute the column widths and output the sequence titles + my $total_count; foreach my $sequence (&Apache::lonstatistics::Sequences_with_Assess()){ # # Comptue column widths @@ -642,6 +644,7 @@ sub html_initialize { # Use 1 digit for a space $sequence->{'width_sum'} += 1; } + $total_count += $sequence->{'num_assess_parts'}; # Use 3 digits for the sum $sequence->{'width_sum'} += 3; } @@ -672,7 +675,8 @@ sub html_initialize { length($sequence->{'title'}) ).$padding; } - $Str .= "total\n"; + $total_sum_width = length($total_count)+1; + $Str .= " total\n"; $Str .= "
";
     $r->print($Str);
     $r->rflush();
@@ -767,9 +771,9 @@ sub html_outputstudent {
         $max   += $seq_stats->{'max'};
     }
     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";
     #
     $r->print($Str);