Re: loadMacros

by Davide Cervone -
Number of replies: 0
The reason for this error is that viewing the problem (even if you haven't edited it) causes a temporary copy to be made (note the name of the file that is being run: "[TMPL]/tmpEdit/Orientation/prob09.pg.robbin.tmp"), and that temporary file is not in the same location as the original file. The problem calls on a parserOrientation.pl file that is common to all the parser orientation problems, and is stored in the same directory as the problem files. The loadMacros() call will find it there because "." (the current directory) is in the macros path. But when you run the problem from the tmpEdit directory, the parserOrientation.pl file is no longer in the same directory, so loadMacros() doesn't find it.

Back in August, I fixed pg/macros/dangerousMacros.pl, which implements loadMacros(), to properly handle files being edited in the tmpEdit heirarchy. You may want to update that file to overcome this problem.