I copied the file over from the old server into the current directory of the problems, but I don't know if there is a better solution.
It looks like those problems were updated last year to no longer use that macro. If you update your copy of the OPL it should fix the issue for those problems, though there are other problems that still use it, so Glenn's suggestion will fix those as well.
Thanks.
I am surprised why my fresh install is out of date.
This is one of the downsides of the new release mechanism for the OPL. The rewrite of those problems was not committed until after the last release. So if you use the OPL-update script you won't get those changes. You can use the OPL-update-legacy script and that will pull the latest from the repository. However, it will also take at least 10 minutes to complete.
If you want the latest from the OPL you'll need to pull the main branch from GitHub, and then run OPL-update-legacy.
I tried that unsuccessfully due to divergent branches, following the installation instructions at
https://webwork.maa.org/wiki/Installation_Manual_for_2.19_on_Ubuntu#Install_the_Ubuntu_24.04_Server_Operating_System
$ cd /opt/webwork/libraries/webwork-open-problem-library $ git remote show origin
* remote origin
Fetch URL: https://github.com/openwebwork/webwork-open-problem-library.git
Push URL: https://github.com/openwebwork/webwork-open-problem-library.git
HEAD branch: main
Remote branch:
main tracked
Local branch configured for 'git pull':
main merges with remote main
Local ref configured for 'git push':
main pushes to main (local out of date)
$ git pull origin
You asked to pull from the remote 'origin', but did not specify a branch. Because this is not the default configured remote for your current branch, you must specify a branch on the command line.
$ git pull origin main
* branch main -> FETCH_HEAD hint: You have divergent branches and need to specify how to reconcile them. hint: You can do so by running one of the following commands sometime before hint: your next pull: hint: hint: git config pull.rebase false # merge hint: git config pull.rebase true # rebase hint: git config pull.ff only # fast-forward only hint: hint: You can replace "git config" with "git config --global" to set a default hint: preference for all repositories. You can also pass --rebase, --no-rebase, hint: or --ff-only on the command line to override the configured default per hint: invocation. fatal: Need to specify how to reconcile divergent branches.
Do you have local changes to any OPL problems? That will determine the best way to proceed. What does "git status" return?
I am not aware of any local changes to the OPL. We always make copies inside courses if we want modifications.
"git status" returns
Refresh index: 100% (85631/85631), done.
On branch v2024-08-14
Untracked files:
(use "git add <file>..." to include in what will be committed)
TABLE-DUMP/
nothing added to commit but untracked files present (use "git add" to track)
I see the file OPL-tables.sql in the TABLE-DUMP directory.
You first need to run "git checkout origin/main" to switch back to the main branch. You are currently on the v2024-08-14 branch. That is a branch created from the v2024-08-14 tag. The OPL-update script switched you to that branch.
After switching back to the main branch, then run "git pull" to get the latest OPL changes.