[system] / branches / rel-2-2-dev / webwork2 / lib / WeBWorK / ContentGenerator / Problem.pm Repository:
ViewVC logotype

Diff of /branches/rel-2-2-dev/webwork2/lib/WeBWorK/ContentGenerator/Problem.pm

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

Revision 2861 Revision 2875
1################################################################################ 1################################################################################
2# WeBWorK Online Homework Delivery System 2# WeBWorK Online Homework Delivery System
3# Copyright © 2000-2003 The WeBWorK Project, http://openwebwork.sf.net/ 3# Copyright © 2000-2003 The WeBWorK Project, http://openwebwork.sf.net/
4# $CVSHeader: webwork-modperl/lib/WeBWorK/ContentGenerator/Problem.pm,v 1.164 2004/09/10 22:40:52 sh002i Exp $ 4# $CVSHeader: webwork-modperl/lib/WeBWorK/ContentGenerator/Problem.pm,v 1.165 2004/10/06 21:01:46 gage Exp $
5# 5#
6# This program is free software; you can redistribute it and/or modify it under 6# This program is free software; you can redistribute it and/or modify it under
7# the terms of either: (a) the GNU General Public License as published by the 7# the terms of either: (a) the GNU General Public License as published by the
8# Free Software Foundation; either version 2, or (at your option) any later 8# Free Software Foundation; either version 2, or (at your option) any later
9# version, or (b) the "Artistic License" which comes with this package. 9# version, or (b) the "Artistic License" which comes with this package.
1016 print CGI::start_div({class=>"scoreSummary"}); 1016 print CGI::start_div({class=>"scoreSummary"});
1017 1017
1018 # score summary 1018 # score summary
1019 my $attempts = $problem->num_correct + $problem->num_incorrect; 1019 my $attempts = $problem->num_correct + $problem->num_incorrect;
1020 my $attemptsNoun = $attempts != 1 ? "times" : "time"; 1020 my $attemptsNoun = $attempts != 1 ? "times" : "time";
1021 my $problem_status = $problem->status || 0;
1021 my $lastScore = sprintf("%.0f%%", $problem->status * 100); # Round to whole number 1022 my $lastScore = sprintf("%.0f%%", $problem_status * 100); # Round to whole number
1022 my ($attemptsLeft, $attemptsLeftNoun); 1023 my ($attemptsLeft, $attemptsLeftNoun);
1023 if ($problem->max_attempts == -1) { 1024 if ($problem->max_attempts == -1) {
1024 # unlimited attempts 1025 # unlimited attempts
1025 $attemptsLeft = "unlimited"; 1026 $attemptsLeft = "unlimited";
1026 $attemptsLeftNoun = "attempts"; 1027 $attemptsLeftNoun = "attempts";

Legend:
Removed from v.2861  
changed lines
  Added in v.2875

aubreyja at gmail dot com
ViewVC Help
Powered by ViewVC 1.0.9