Few questions may help with troubleshooting:
- Does this only happen when running course from Moodle?
- Does the previous version of the course exhibit the same behavior?
- Have you added any custom JavaScript code to the course?
- Does the error occur when the course opens or does it only happen on a single page?
The error message is telling you that the course tried to access a property (or variable) called "openstate" and the process failed because the property is undefined. This is a common JavaScript error and because it also is revealing a line number (588) it should be traceable. If it said line number 1, then the error is much harder to trace. But in your case the browser is telling you exactly where it stumbled on the code. While it is not telling you the file name, knowing the line number is still helpful.
The property "openstate" is not referenced in any of the PowerPac files so this error does not seem to originate with anything in the PowerPac.
If you have version updated the course from an older ToolBook file, that may be a factor to consider, especially if the error occurs on only one page. (BTW: A single page error is the easiest type of error to track down and to fix.)