WeBWorK Problems

Undefined Subroutine when updating OPL

Undefined Subroutine when updating OPL

by David Nawrocki -
Number of replies: 1
I'm trying to update my OPL.  When I update my OPL many of my problems in my course problem sets return an "Undefined subroutine" error.  When I revert back to the old OPL the errors go away.  I've checked and the problems are exactly the same in the old and new OPL.  Any suggestions would be appreciated.  
In reply to David Nawrocki

Re: Undefined Subroutine when updating OPL

by Danny Glin -

If you updated the OPL and you are not on the current version of WeBWorK, then this is likely due to the fact that all macro files were removed from the OPL some time in the last couple of years.

These macros were all migrated to /opt/webwork/pg/macros, so if you are using a current version of the OPL with an old version of WeBWorK, they may be missing.

Ideally you should upgrade WeBWorK to the current version, but if that is not practical you can copy the macros folder from the OPL into a place where they can be found by WeBWorK: either the course templates/macros folder for a single course, or a subfolder of the pg/macros folder.  Just be careful that when you do upgrade WeBWorK you should delete this temporary copy so that the system is looking at the most up-to-date version.