[system] / branches / gage_dev / webwork2 / lib / WeBWorK / ContentGenerator / Problem.pm Repository:
ViewVC logotype

Diff of /branches/gage_dev/webwork2/lib/WeBWorK/ContentGenerator/Problem.pm

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

Revision 1246 Revision 1279
762 762
763 my $numIncorrectNoun = scalar @answerNames == 1 ? "question" : "questions"; 763 my $numIncorrectNoun = scalar @answerNames == 1 ? "question" : "questions";
764 my $scorePercent = sprintf("%.0f%%", $problemResult->{score} * 100); 764 my $scorePercent = sprintf("%.0f%%", $problemResult->{score} * 100);
765 my $summary = "On this attempt, you answered $numCorrect out of " 765 my $summary = "On this attempt, you answered $numCorrect out of "
766 . scalar @answerNames . " $numIncorrectNoun correct, for a score of $scorePercent."; 766 . scalar @answerNames . " $numIncorrectNoun correct, for a score of $scorePercent.";
767 return CGI::table({-class=>"attemptResults"}, CGI::Tr(\@tableRows)) . ($showSummary ? CGI::p($summary) : ""); 767 return CGI::table({-class=>"attemptResults"}, CGI::Tr(\@tableRows)) . ($showSummary ? CGI::p({class=>'emphasis'},$summary) : "");
768} 768}
769sub nbsp { 769sub nbsp {
770 my $str = shift; 770 my $str = shift;
771 ($str) ? $str : ' '; # returns non-breaking space for empty strings 771 ($str) ? $str : ' '; # returns non-breaking space for empty strings
772} 772}

Legend:
Removed from v.1246  
changed lines
  Added in v.1279

aubreyja at gmail dot com
ViewVC Help
Powered by ViewVC 1.0.9