Installation

Some problems have error - Can't locate macro file

Some problems have error - Can't locate macro file

by Bill Sadvary -
Number of replies: 2
I recently upgraded from 2.5.0 to 2.7 and most everything seems to be working OK except for some problems that are giving errors.

More specifically...

While in the Library Browser, I select "National Problem Library" and a Subject of "Abstract Algebra" and the search will display the majority of the problems just fine but a few with "This problem produced an error."

Down in the warnings section, for each problem with an error, it shows...

Can't locate macro file |algebraMacros.pl| via path: |.|, |/opt/webwork/courses/admin/templates/macros|, |/opt/webwork/pg/macros|, |/opt/webwork/courses/admin/templates/Library/macros/Union|, |/opt/webwork/courses/admin/templates/Library/macros/Michigan|, |/opt/webwork/courses/admin/templates/Library/macros/CollegeOfIdaho|, |/opt/webwork/courses/admin/templates/Library/macros/FortLewis|, |/opt/webwork/courses/admin/templates/Library/macros/TCNJ|, |/opt/webwork/courses/admin/templates/Library/macros/NAU|, |/opt/webwork/courses/admin/templates/Library/macros/Dartmouth|, |/opt/webwork/courses/admin/templates/Library/macros/WHFreeman| at [PG]/lib/PGloadfiles.pm line 170
•Use of uninitialized value in numeric le (<=) at /opt/webwork/pg/lib/WeBWorK/PG/Translator.pm line 1009



I attached a txt file showing the complete list of warnings/errors.

I'm not sure of these problems existed before the upgrade or not.

Any help would be appreciated.

-Bill
In reply to Bill Sadvary

Re: Some problems have error - Can't locate macro file

by John Jones -
There is a variable set in webwork2/conf/defaults.config which should include this.  It does for 2.8, but maybe 2.7 came out before the UMass-Amherst abstract algebra problems were added to the OPL.  You can override the variable in localOverrides.conf with

$pg{directories}{macrosPath} = [
   ".",                     # search the problem file's directory
   $courseDirs{macros},
   $pg{directories}{macros},
   "$courseDirs{templates}/Library/macros/Union",
   "$courseDirs{templates}/Library/macros/Michigan",
   "$courseDirs{templates}/Library/macros/CollegeOfIdaho",
   "$courseDirs{templates}/Library/macros/FortLewis",
   "$courseDirs{templates}/Library/macros/TCNJ",
   "$courseDirs{templates}/Library/macros/NAU",
   "$courseDirs{templates}/Library/macros/Dartmouth",
   "$courseDirs{templates}/Library/macros/WHFreeman",
   "$courseDirs{templates}/Library/macros/UMass-Amherst",
];

John