Louis,
I think it is currently necessary to copy the image into the local directory in which you are saving the .pg file.
To obtain a copy of the image, you can simply view the original problem and right- (or command)-click on it, then "Save image as", save a copy to your desktop and then upload it to the file manager in the same dir as the pg file.
Maybe there is an easier way I don't know about, but this is one way.
Hope this helps,
Jason
I think it is currently necessary to copy the image into the local directory in which you are saving the .pg file.
To obtain a copy of the image, you can simply view the original problem and right- (or command)-click on it, then "Save image as", save a copy to your desktop and then upload it to the file manager in the same dir as the pg file.
Maybe there is an easier way I don't know about, but this is one way.
Hope this helps,
Jason
Take a look at the example
NationalProblemLibrary/Rochester/setSampleGraphs/c0s1p8/
The directory c0s1p8 contains the pg file c0s1p8.pg and all the images the problem uses. Note the name of the directory is the same as the name of the problem without the .pg extension. If you copy this directory to your course's /templates/local/ directory, you will see the problem in the Library Browser when you select "Local Problems" and then select local in the drop down list.
Keeping the pg problem and all the associated images in a separate directory such as c0s1p8 is a good way to keep all the components of the problem together.
But how would an instructor who does not have access to /opt/webwork/libraries/NationalProblemLibrary/Rochester/setSampleGraphs copy (or link to) that directory?
Since I have access to our WeBWorK server, I can easily copy (or link to) files. But what about a colleague who doesn't have such access? Jason's suggestion seems like the only option in that case.
Louis,
That's currently the only option from within webwork, but I think Mike is working on improving that, so that exported or saved problems/sets come with their external resources.
Another option is to find the directory in the web interface to our version control system:
http://webwork.maa.org/viewvc/npl/trunk/NationalProblemLibrary/Rochester/setSampleGraphs/
You can download files there by clicking on the file name, then selecting the first (top) "download" link.
Of course, if your colleague can use svn, he or she can check out the directory (or the whole NPL) with svn directly to his local computer.
Hope this helps,
Jason
That's currently the only option from within webwork, but I think Mike is working on improving that, so that exported or saved problems/sets come with their external resources.
Another option is to find the directory in the web interface to our version control system:
http://webwork.maa.org/viewvc/npl/trunk/NationalProblemLibrary/Rochester/setSampleGraphs/
You can download files there by clicking on the file name, then selecting the first (top) "download" link.
Of course, if your colleague can use svn, he or she can check out the directory (or the whole NPL) with svn directly to his local computer.
Hope this helps,
Jason
Hi Louis,
This is easy. Select the problem in NationalProblemLibrary/Rochester/setSampleGraphs and add it to your set using the library browser. Then view the problem in your assignment and click edit this problem. Then save a local copy. This will save the directory and all associated files in a separate directory. And then if you want to send this to friends, you can do this with the file manager.
Arnie
Thanks, Arnie.
So, if I understand correctly, it all comes down to how the .pg and associated files are "bundled" within the NPL. If they are bundled as in your example, then an instructor can edit a problem and save a local copy, and all associated files are carried along.
Correct.
Unfortunately not all authors know about or choose to use this convention so you will certainly fine examples where the .pg file and its associated graphic image files are not in a separate directory, but in a directory with a lot of other .pg files and graphic image files. That makes it more difficult to keep everything associated with a single problem together.
Arnie
Perhaps someone should bring this issue to the attention of the W.H. Freeman coding team. It was a quadric surfaces problem from the recently released Rogawski collection that prompted my original post.