[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 1016 Revision 1034
501 501
502 print CGI::start_div({class=>"scoreSummary"}); 502 print CGI::start_div({class=>"scoreSummary"});
503 # score summary 503 # score summary
504 my $attempts = $problem->num_correct + $problem->num_incorrect; 504 my $attempts = $problem->num_correct + $problem->num_incorrect;
505 my $attemptsNoun = $attempts != 1 ? "times" : "time"; 505 my $attemptsNoun = $attempts != 1 ? "times" : "time";
506 my $lastScore = int ($problem->status * 100) . "%"; 506 my $lastScore = sprintf("%.0f%%", $problem->status * 100); # Round to whole number
507 my ($attemptsLeft, $attemptsLeftNoun); 507 my ($attemptsLeft, $attemptsLeftNoun);
508 if ($problem->max_attempts == -1) { 508 if ($problem->max_attempts == -1) {
509 # unlimited attempts 509 # unlimited attempts
510 $attemptsLeft = "unlimited"; 510 $attemptsLeft = "unlimited";
511 $attemptsLeftNoun = "attempts"; 511 $attemptsLeftNoun = "attempts";

Legend:
Removed from v.1016  
changed lines
  Added in v.1034

aubreyja at gmail dot com
ViewVC Help
Powered by ViewVC 1.0.9