| 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/Instructor/Stats.pm,v 1.42 2004/06/02 14:54:26 gage Exp $ |
4 | # $CVSHeader: webwork-modperl/lib/WeBWorK/ContentGenerator/Instructor/Stats.pm,v 1.43 2004/06/16 15:22:08 toenail 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. |
| … | |
… | |
| 365 | # It's possible that $incorrect is an empty or blank string instead of 0 the || clause fixes this and prevents |
365 | # It's possible that $incorrect is an empty or blank string instead of 0 the || clause fixes this and prevents |
| 366 | # warning messages in the comparison below. |
366 | # warning messages in the comparison below. |
| 367 | $string .= $longStatus; |
367 | $string .= $longStatus; |
| 368 | $twoString .= threeSpaceFill($num_incorrect); |
368 | $twoString .= threeSpaceFill($num_incorrect); |
| 369 | my $probValue = $problemRecord->value; |
369 | my $probValue = $problemRecord->value; |
| 370 | $probValue = 1 unless defined($probValue); # FIXME?? set defaults here? |
370 | $probValue = 1 unless defined($probValue) and $probValue ne ""; # FIXME?? set defaults here? |
| 371 | $total += $probValue; |
371 | $total += $probValue; |
| 372 | $totalRight += round_score($status*$probValue) if $valid_status; |
372 | $totalRight += round_score($status*$probValue) if $valid_status; |
| 373 | |
373 | |
| 374 | $num_of_attempts += $num_correct + $num_incorrect; |
374 | $num_of_attempts += $num_correct + $num_incorrect; |
| 375 | |
375 | |