WeBWorK Main Forum

includePGproblem

includePGproblem

by Andras Balogh -
Number of replies: 3
I am not sure how appropriate it is to post about upcoming versions.

I just upgraded to 2.11 from a two-year old 2.8, and none of the problems work with includePGproblem references.

ERRORS from evaluating PG file:
Illegal division by zero at line 10 of (eval 177952)

Line 10 has
includePGproblem(Library/272/setStewart14_2/UR_VC_5_3.pg);
It looks like the forward slash is being evaluated as division.
It works correctly if quotes surround the path:
includePGproblem("Library/272/setStewart14_2/UR_VC_5_3.pg");

----
Andras
In reply to Andras Balogh

Re: includePGproblem

by Geoff Goehle -
Posting about upcoming versions is fine;  especially 2.11 since it will be out today or tomorrow. 

I think this is a bug in the OPL, not includePGproblem.  You can't have unquoted file paths like that in perl.  JJ wrote a script to collapse include chains.  Its possible that there are some missing quotes in that script.  I grepped an older version of the OPL and there are no unquoted paths.  I grepped the most recent version and there are lots of unquoted paths.  


In reply to Andras Balogh

Re: includePGproblem

by John Jones -
Geoff is correct.  This probably happened when trying to shorten chains of redirection in problems.  If you do a "git pull" to get an updated copy of the OPL, it should now work.  

John

PS  Independent of updating your copy of the OPL, you might update paths to go directly to problems instead to these pointer files.
In reply to John Jones

Re: includePGproblem

by Andras Balogh -
Thanks!

git pull fixed the problem today.
Since I installed OPL with the missing the quotes yesterday, I was not expecting this.

Andras