[system] / trunk / pg / macros / answerCustom.pl Repository:
ViewVC logotype

Diff of /trunk/pg/macros/answerCustom.pl

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

Revision 4771 Revision 4808
1loadMacros('Parser.pl'); 1loadMacros('Parser.pl');
2 2
3sub _answerCustom_init {}; # don't reload this file 3sub _answerCustom_init {}; # don't reload this file
4
5=head custom response evaluator
4 6
5###################################################################### 7######################################################################
6# 8#
7# This answer checker provides an easy method for creating an answer 9# This answer checker provides an easy method for creating an answer
8# checker with a custom subroutine that performs the check for 10# checker with a custom subroutine that performs the check for
55# the page. If the checker generates a fatal runtime error (e.g., 57# the page. If the checker generates a fatal runtime error (e.g.,
56# calls the "die" function), then the message is reported with the 58# calls the "die" function), then the message is reported with the
57# "pink screen of death", and includes a request for the student to 59# "pink screen of death", and includes a request for the student to
58# inform the instructor. 60# inform the instructor.
59# 61#
62
63=cut
60 64
61sub custom_cmp { 65sub custom_cmp {
62 my $correct = shift; my $checker = shift; 66 my $correct = shift; my $checker = shift;
63 die "custom_cmp requires a correct answer" unless defined($correct); 67 die "custom_cmp requires a correct answer" unless defined($correct);
64 die "custom_cmp requires a checker subroutine" unless defined($checker); 68 die "custom_cmp requires a checker subroutine" unless defined($checker);

Legend:
Removed from v.4771  
changed lines
  Added in v.4808

aubreyja at gmail dot com
ViewVC Help
Powered by ViewVC 1.0.9