--- loncom/interface/statistics/lonstudentassessment.pm 2009/08/14 12:37:44 1.150.2.3 +++ loncom/interface/statistics/lonstudentassessment.pm 2009/05/17 22:55:42 1.154 @@ -1,6 +1,6 @@ # The LearningOnline Network with CAPA # -# $Id: lonstudentassessment.pm,v 1.150.2.3 2009/08/14 12:37:44 raeburn Exp $ +# $Id: lonstudentassessment.pm,v 1.154 2009/05/17 22:55:42 bisitz Exp $ # # Copyright Michigan State University Board of Trustees # @@ -248,14 +248,14 @@ sub next_and_previous_buttons { if (defined($previous)) { my $sname = $previous->{'username'}.':'.$previous->{'domain'}; $previousbutton .= ''; } else { $previousbutton .= ''; + 'Previous student (none)'.'" />'; } # # Build the next student link @@ -264,19 +264,19 @@ sub next_and_previous_buttons { if (defined($next)) { my $sname = $next->{'username'}.':'.$next->{'domain'}; $nextbutton .= ''; } else { $nextbutton .= ''; + 'Next student (none)'.'" />'; } # # Build the 'all students' button my $all = ''; - $all .= ''; $Str .= $previousbutton.(' 'x5).$all.(' 'x5).$nextbutton; @@ -361,20 +361,19 @@ sub CreateInterface { $Str .= &CreateAndParseOutputDataSelector(); $Str .= ''."\n"; $Str .= ''."\n"; - $Str .= '

'. - &mt('Status:').' '. - ''. - '

'; + $Str .= ''; + $Str .= ' 'x5; $Str .= ''; $Str .= ' 'x5; $Str .= ''; - $Str .= '

'. - ''. - '

'; - + $Str .= '

'; + $Str .= + &mt('Status [_1]', + ''); + $Str .= '

'; return $Str; } @@ -664,9 +663,9 @@ sub html_initialize { &Apache::lonstatistics::selected_sequences_with_assessments(); if (! ref($navmap)) { # Unable to get data, so bail out - $r->print('

'. + $r->print("

". &mt('Unable to retrieve course information.'). - '

'); + '

'); } # If we're showing links, show a checkbox to open in new @@ -683,7 +682,7 @@ NEW_WINDOW_CHECKBOX # $r->print("

".$env{'course.'.$env{'request.course.id'}.'.description'}. - "  ".&Apache::lonlocal::locallocaltime(time)."

"); + "  ".localtime(time).""); # if ($chosen_output->{'base'} !~ /^final table/) { $r->print("

".&mt($chosen_output->{'shortdesc'})."

"); @@ -714,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'}) { @@ -723,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'}) { @@ -886,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'}) { @@ -929,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";