[system] / trunk / webwork-modperl / lib / WeBWorK / ContentGenerator / Problem.pm Repository:
ViewVC logotype

Diff of /trunk/webwork-modperl/lib/WeBWorK/ContentGenerator/Problem.pm

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

Revision 1048 Revision 1049
690 $row .= $answerMessage ? CGI::td($answerMessage) : ""; 690 $row .= $answerMessage ? CGI::td($answerMessage) : "";
691 push @tableRows, $row; 691 push @tableRows, $row;
692 } 692 }
693 693
694 my $numIncorrectNoun = scalar @answerNames == 1 ? "question" : "questions"; 694 my $numIncorrectNoun = scalar @answerNames == 1 ? "question" : "questions";
695 my $scorePercent = int ($problemResult->{score} * 100) . "\%"; 695 my $scorePercent = sprintf("%.0f%%", $problemResult->{score} * 100);
696 my $summary = "On this attempt, you answered $numCorrect out of " 696 my $summary = "On this attempt, you answered $numCorrect out of "
697 . scalar @answerNames . " $numIncorrectNoun correct, for a score of $scorePercent."; 697 . scalar @answerNames . " $numIncorrectNoun correct, for a score of $scorePercent.";
698 return CGI::table({-class=>"attemptResults"}, CGI::Tr(\@tableRows)) . ($showSummary ? CGI::p($summary) : ""); 698 return CGI::table({-class=>"attemptResults"}, CGI::Tr(\@tableRows)) . ($showSummary ? CGI::p($summary) : "");
699} 699}
700 700

Legend:
Removed from v.1048  
changed lines
  Added in v.1049

aubreyja at gmail dot com
ViewVC Help
Powered by ViewVC 1.0.9