| 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.109 2003/12/09 01:12:31 sh002i Exp $ |
4 | # $CVSHeader: webwork-modperl/lib/WeBWorK/ContentGenerator/Problem.pm,v 1.110 2003/12/10 18:50:36 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. |
| … | |
… | |
| 837 | my $correctAnswer = $answerResult->{correct_ans}; |
837 | my $correctAnswer = $answerResult->{correct_ans}; |
| 838 | my $answerScore = $answerResult->{score}; |
838 | my $answerScore = $answerResult->{score}; |
| 839 | my $answerMessage = $showMessages ? $answerResult->{ans_message} : ""; |
839 | my $answerMessage = $showMessages ? $answerResult->{ans_message} : ""; |
| 840 | #FIXME --Can we be sure that $answerScore is an integer-- could the problem give partial credit? |
840 | #FIXME --Can we be sure that $answerScore is an integer-- could the problem give partial credit? |
| 841 | $numCorrect += $answerScore > 0; |
841 | $numCorrect += $answerScore > 0; |
| 842 | my $resultString = $answerScore ? "correct" : "incorrect"; |
842 | my $resultString = $answerScore == 1 ? "correct" : "incorrect"; |
| 843 | |
843 | |
| 844 | # get rid of the goofy prefix on the answer names (supposedly, the format |
844 | # get rid of the goofy prefix on the answer names (supposedly, the format |
| 845 | # of the answer names is changeable. this only fixes it for "AnSwEr" |
845 | # of the answer names is changeable. this only fixes it for "AnSwEr" |
| 846 | #$name =~ s/^AnSwEr//; |
846 | #$name =~ s/^AnSwEr//; |
| 847 | |
847 | |