From: Michael G. <ga...@ma...> - 2005-09-13 04:19:15
|
Thanks very much John. That was the problem. I was pretty sure it was a flag set somewhere. I'm not sure why the old macros couldn't handle this, but I'm not going to worry too much about it. Things seem to be working well now. Take care, Mike On Sep 12, 2005, at 11:30 PM, John Jones wrote: > Hi Mike, > > For what its worth, this works fine if I use the parser based > version of the macros. I get the errors only if I have > useOldAnswerMacros=1. > > John > > > Michael Gage wrote: >> Hi Davide, >> >> I'm hoping you can help me out. I'm getting a bug on the >> following problem below whenever 'DNE' is entered as an answer. >> >> Do you recognize this as some configuration flag I'm missing? I >> have the pg directory up to the latest CVS HEAD. >> I'm also seeing this error on devel which wasn't affected by the >> latest crash. >> >> Rolling back the pg directory a month doesn't seem to affect the >> problem -- it is there in either case. >> >> I've listed the error message below the problem. It would help if >> you could try this out >> on your machine and let me know whether it works. I'm puzzled as >> to why these problems >> have stopped working on all three machine (devel, hosted and math) >> particularly since not much has been going on >> on devel. >> >> Thanks much. >> >> Take care, >> >> Mike >> >> >> DOCUMENT(); # This should be the first executable line in >> the problem. >> >> loadMacros( >> "PG.pl", >> "PGbasicmacros.pl", >> "PGchoicemacros.pl", >> "PGanswermacros.pl", >> "PGgraphmacros.pl", >> "PGauxiliaryFunctions.pl" >> ); >> >> TEXT(beginproblem()); >> $showPartialCorrectAnswers = 1; >> BEGIN_TEXT >> Enter DNE or a number \{ans_rule\} >> $PAR >> Enter DNE or a number \{ans_rule\} >> >> END_TEXT >> >> ANS(num_cmp('DNE', strings=>['DNE'])) ; >> ANS(num_cmp(5, strings=>['DNE'])) ; >> >> ENDDOCUMENT(); # This should be the last executable line in >> the problem. >> >> ##### >> Warning messages >> >> Error in Translator.pm::process_answers: Answer AnSwEr1: |dne| >> Not a CODE reference at line 4015 of (eval 366) >> Died within main::check_strings called at line 545 of [PG]/lib/ >> AnswerHash.pm >> from within AnswerEvaluator::evaluate called at line 1 of (eval 785) >> Error in Translator.pm::process_answers: Answer AnSwEr1: >> Answer evaluators must return a hash or an AnswerHash type, not >> type || at /home/gage/webwork/pg/lib/WeBWorK/PG/Translator.pm line >> 1158 >> Use of uninitialized value in numeric ge (>=) at /home/gage/ >> webwork/webwork-modperl/lib/WeBWorK/ContentGenerator/Problem.pm >> line 252. >> Use of uninitialized value in pattern match (m//) at /home/gage/ >> webwork/webwork-modperl/lib/WeBWorK/ContentGenerator/Problem.pm >> line 253. >> Use of uninitialized value in numeric ge (>=) at /home/gage/ >> webwork/webwork-modperl/lib/WeBWorK/ContentGenerator/Problem.pm >> line 254. >> Use of uninitialized value in numeric gt (>) at /home/gage/webwork/ >> webwork-modperl/lib/WeBWorK/ContentGenerator/Problem.pm line 254. >> Use of uninitialized value in numeric gt (>) at /home/gage/webwork/ >> webwork-modperl/lib/WeBWorK/ContentGenerator/Problem.pm line 257. >> >> "Only dead fish swim with the stream." >> >> > "Only dead fish swim with the stream." |