I am currently in the process of setting up my very first WeBWork course. I'd like to modify a few of the problems in the Orientation set, however, every time I try to do this, I receive error messages. I found other posts about this in the forums, but they seemed to be a few years old and did not help me resolve the issue. After editing a problem (for example prob01), I am selecting "Save as [TMPL]/local/setOrientation/prob01.pg" and "and replace set Orientation/problem 1". However, when I go to view the updated version, I get the following error message:
Can't locate macro file |parserOrientation.pl| via path: |.|, |/opt/webwork/courses/plymouth_ma2560/templates/macros|, |/opt/webwork/pg/macros|, |/opt/webwork/courses/plymouth_ma2560/templates/Library/macros/Union|, |/opt/webwork/courses/plymouth_ma2560/templates/Library/macros/HughesHallett|, |/opt/webwork/courses/plymouth_ma2560/templates/Library/macros/Michigan|, |/opt/webwork/courses/plymouth_ma2560/templates/Library/macros/CollegeOfIdaho|, |/opt/webwork/courses/plymouth_ma2560/templates/Library/macros/TCNJ|, |/opt/webwork/courses/plymouth_ma2560/templates/Library/macros/NAU|, |/opt/webwork/courses/plymouth_ma2560/templates/Library/macros/Dartmouth| at line 310 of (eval 1280) Died within main::loadMacros called at line 3 of [TMPL]/local/setOrientation/prob01b.pg
I realize that this has to do with the parserOrientation file not being found in [TMPL]/local and there were posts about obtaining this file, but I have been unsuccessful and locating it.
Can anyone help?
Also, I have a related, but more general question. How does one manage files at [TMPL]/local, so that I can replace files? It may be worth noting that my course is being hosted at Rochester.
(I apologize if this is my second post about this. My first attempt failed for some reason.)
Thanks.
Dana Ernst
Plymouth State University
To answer your second question -- You can use the File Manager link in the left hand margin of the WeBWorK page to manage files within your course -- you won't be able to reach files outside of your course.
If you place a copy of the [TMP]/setOrientation/parserOrientation.pl
in the directory [TMP]/macros
then that macro file will be in the search path of loadMacros even for those questions in [TMPL]/local/......
You can use the "copy" command in the File Manager to do this. Or you can download the file and then upload it again into the macros directory.
(TMPL is an abbreviation for "templates" ... most of your files are stored in the directory
.../yourcourseName/templates/
Hope this helps.
-- Mike
If you place a copy of the [TMP]/setOrientation/parserOrientation.pl
in the directory [TMP]/macros
then that macro file will be in the search path of loadMacros even for those questions in [TMPL]/local/......
You can use the "copy" command in the File Manager to do this. Or you can download the file and then upload it again into the macros directory.
(TMPL is an abbreviation for "templates" ... most of your files are stored in the directory
.../yourcourseName/templates/
Hope this helps.
-- Mike
Great, thanks. I've got it all sorted out. Is there a reason that this isn't set up by default?
Dana
Dana
A better location for the parserOrientation.pl file might be
[TMPL]/local/setOrientation
so that it is with the modified orientation problem files rather than the macros directory. Because "." is in the macro path, it will find the macro file in the same directory as the problem file.
Davide
[TMPL]/local/setOrientation
so that it is with the modified orientation problem files rather than the macros directory. Because "." is in the macro path, it will find the macro file in the same directory as the problem file.
Davide
Davide's right about this. The reason we don't put parserOrientation in the macros directory by default is that it is specialized to this one homework set.
For that matter a local copy of setOrientation is placed in each new course precisely because the information in it often needs modification. (where to get help -- for example). You could modify those files without moving them to a different directory.
For that matter a local copy of setOrientation is placed in each new course precisely because the information in it often needs modification. (where to get help -- for example). You could modify those files without moving them to a different directory.
Thanks again!
Sorry to bother you with this again.
Michael, are you saying that there should be a copy of setOrientation in [TMPL]/local before I even attempt to edit problems? That sounds like what you said, but maybe I'm taking you too literally. Regardless, I don't have a copy of setOrientation in [TMPL]/local. For clarity in the future, should I think of everything inside [TMPL] as "local"?
I realize now that I shouldn't have been saving the revised problems to [TMPL]/local in the first place. I'm assuming that when you said "You could modify those problems without moving them to a different directory," that this is what you meant. I was following these instructions:
http://webwork.maa.org/wiki/MinorProblemModificationTutorial
I was falsely under the impression that I couldn't edit the problems in setOrientation unless I saved the new version to [TMPL]/local.
Michael, are you saying that there should be a copy of setOrientation in [TMPL]/local before I even attempt to edit problems? That sounds like what you said, but maybe I'm taking you too literally. Regardless, I don't have a copy of setOrientation in [TMPL]/local. For clarity in the future, should I think of everything inside [TMPL] as "local"?
I realize now that I shouldn't have been saving the revised problems to [TMPL]/local in the first place. I'm assuming that when you said "You could modify those problems without moving them to a different directory," that this is what you meant. I was following these instructions:
http://webwork.maa.org/wiki/MinorProblemModificationTutorial
I was falsely under the impression that I couldn't edit the problems in setOrientation unless I saved the new version to [TMPL]/local.
As
http://webwork.maa.org/wiki/MinorProblemModificationTutorial
points out you are not allowed to modify the NationalProblemLibrary files so for those you need to make local copies. The setOrientation homework set is special since it is very often customized. Hence we provide each course with its own copy so that it can be customized in place.
You can also make a copy in another subdirectory but you need to make sure that the macro file parserOrientation.pl is still in the search path for the file.
The search path is (unless it's modified) (1) the same directory that the question file is in (2) the courses macro directory (3) any macro directories for the various libraries that have been included in the path, (4) the main webwork site collection of macro files. The search path is set in the global.conf directory which is set by the site manager.
http://webwork.maa.org/wiki/MinorProblemModificationTutorial
points out you are not allowed to modify the NationalProblemLibrary files so for those you need to make local copies. The setOrientation homework set is special since it is very often customized. Hence we provide each course with its own copy so that it can be customized in place.
You can also make a copy in another subdirectory but you need to make sure that the macro file parserOrientation.pl is still in the search path for the file.
The search path is (unless it's modified) (1) the same directory that the question file is in (2) the courses macro directory (3) any macro directories for the various libraries that have been included in the path, (4) the main webwork site collection of macro files. The search path is set in the global.conf directory which is set by the site manager.