| 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.112 2004/01/23 21:46:37 gage Exp $ |
4 | # $CVSHeader: webwork-modperl/lib/WeBWorK/ContentGenerator/Problem.pm,v 1.113 2004/02/04 00:32:12 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. |
| … | |
… | |
| 549 | my $answerString = ""; |
549 | my $answerString = ""; |
| 550 | my %answerHash = %{ $pg->{answers} }; |
550 | my %answerHash = %{ $pg->{answers} }; |
| 551 | # FIXME this is the line 552 error. make sure original student ans is defined. |
551 | # FIXME this is the line 552 error. make sure original student ans is defined. |
| 552 | # The fact that it is not defined is probably due to an error in some answer evaluator. |
552 | # The fact that it is not defined is probably due to an error in some answer evaluator. |
| 553 | # But I think it is useful to suppress this error message in the log. |
553 | # But I think it is useful to suppress this error message in the log. |
|
|
554 | foreach (sort keys %answerHash) { |
| 554 | my $student_ans = $answerHash{$_}->{original_student_ans} ||''; |
555 | my $student_ans = $answerHash{$_}->{original_student_ans} ||''; |
| 555 | $answerString = $answerString . $student_ans."\t" |
556 | $answerString .= $student_ans."\t" |
| 556 | foreach (sort keys %answerHash); |
557 | } |
| 557 | $answerString = '' unless defined($answerString); # insure string is defined. |
558 | $answerString = '' unless defined($answerString); # insure string is defined. |
| 558 | writeCourseLog($self->{ce}, "answer_log", |
559 | writeCourseLog($self->{ce}, "answer_log", |
| 559 | join("", |
560 | join("", |
| 560 | '|', $problem->user_id, |
561 | '|', $problem->user_id, |
| 561 | '|', $problem->set_id, |
562 | '|', $problem->set_id, |
| 562 | '|', $problem->problem_id, |
563 | '|', $problem->problem_id, |