--- loncom/interface/statistics/lonstudentassessment.pm 2008/09/16 13:10:19 1.150 +++ loncom/interface/statistics/lonstudentassessment.pm 2008/10/14 15:16:58 1.151 @@ -1,6 +1,6 @@ # The LearningOnline Network with CAPA # -# $Id: lonstudentassessment.pm,v 1.150 2008/09/16 13:10:19 bisitz Exp $ +# $Id: lonstudentassessment.pm,v 1.151 2008/10/14 15:16:58 www Exp $ # # Copyright Michigan State University Board of Trustees # @@ -713,8 +713,8 @@ NEW_WINDOW_CHECKBOX $width{$symb}->{'width_sum'} += 1; } $total_count += &count_parts($navmap,$seq); - # Use 3 digits for the sum - $width{$symb}->{'width_sum'} += 3; + # Use 6 digits for the sum + $width{$symb}->{'width_sum'} += 6; } # Compute width of maximum if ($chosen_output->{'sequence_max'}) { @@ -722,8 +722,8 @@ NEW_WINDOW_CHECKBOX # One digit for the '/' $width{$symb}->{'width_sum'} +=1; } - # Use 3 digits for the total - $width{$symb}->{'width_sum'}+=3; + # Use 6 digits for the total + $width{$symb}->{'width_sum'}+=6; } # if ($chosen_output->{'every_problem'}) { @@ -885,16 +885,17 @@ sub html_outputstudent { $ratio .= ' '; } if ($chosen_output->{'sequence_sum'} && $score ne ' ') { - my $score .= sprintf("%3.0f",$score); - $ratio .= (' 'x(3-length($score))).$score; + my $score .= sprintf("%3.2f",$score); + $ratio .= (' 'x(6-length($score))).$score; } elsif($chosen_output->{'sequence_sum'}) { - $ratio .= ' 'x3; + $ratio .= ' 'x6; } if ($chosen_output->{'sequence_max'}) { if ($chosen_output->{'sequence_sum'}) { $ratio .= '/'; } - $ratio .= sprintf("%3.0f",$seq_max); + my $sequence_total=sprintf("%3.2f",$seq_max); + $ratio .= $sequence_total.(' 'x(6-length($sequence_total))); } # if (! $chosen_output->{'every_problem'}) { @@ -928,8 +929,8 @@ sub html_outputstudent { if (! defined($score)) { $score = ' ' x $total_sum_width; } else { - $score = sprintf("%.0f",$score); - $score = (' 'x(3-length($score))).$score; + $score = sprintf("%.2f",$score); + $score = (' 'x(6-length($score))).$score; } $Str .= ' '.' 'x($total_sum_width-length($score)).$score.' / '.$max; $Str .= " \n";