PREP 2014 Question Authoring - Archived

new version button

new version button

by Joel Trussell -
Number of replies: 7
I used to be able to get the "new version" button in my problems simply by including the "PGcourse.pl" macro. Now I can't get it when I view my problems. I used this feature myself for crude check on verifying the problems would "work" with a variety of random parameters. How do I force it to show now? 
In reply to Joel Trussell

Re: new version button

by Davide Cervone -
You probably had a version of PGcourse.pl in your course's templates/macros folder that included the problemRandomize code. You will need to get a copy of that PGcourse.pl file and put it in your current course.
In reply to Davide Cervone

Re: new version button

by Joel Trussell -
How do I find a version of PGcourse.pl that has the right addition? Better, what is the current best way to get the "new version" button for both me and the students. From checking the web I note that you answered this question in the 
http://webwork.maa.org/moodle/mod/forum/discuss.php?d=3349&parent=8557

This makes  it seem like the new version button, which make the practice problems practical is available only locally. This is a great selling point for Webwork and part of the training that Everitt discusses. 
In reply to Joel Trussell

Re: new version button

by Davide Cervone -
The link you provide above includes a link to the documentation for problemRandomize.pl, which tells you what to put into your PGcourse.pl file. If you don't have one, use the File Manager to create one, and then edit it to include the required code.


I'm not sure what you are asking in your second paragraph. If you mean that your PGcourse.pl only affects your course and no one else's, then that is correct. If you want to make problems that always include the new version button, then you can include the problemRandomize.pl code into the PG file directly.

In reply to Davide Cervone

Re: new version button

by Joel Trussell -
I think I'm beginning to understand. I thought PGcourse.pl was a standard macro that always included something thta allowed the "new version" button. It seems that I was grabbing a version of PGcourse.pl that was local to NCSU. I checked the file manager and I can't find it. Is there a "standard" PGcourse.pl that I can add the required commands to? I'll check with my systems person. 
In reply to Joel Trussell

Re: new version button

by Joel Trussell -
I found the PGcourse.pl in the macros/ folder - top level. I copied it to the new system - which had NO files in the macros/ folder - and it works - gives the new version button. 

So where was it getting the PGcourse.pl before I inserted a copy into the macros/ folder? 
In reply to Joel Trussell

Re: new version button

by Davide Cervone -
There is a blank one in the pg/macros directory, which is the one that gets used if there isn't one in your course directory.

There is a configuration variable that gives the directories to search for macro files. It starts with the directory containing the PG file itself, and then uses your course's templates/macros folder, then (depending on your configuration) the WeBWorK problem library's macro folders, and usually ends with the main pg/macros directory.
In reply to Joel Trussell

Re: new version button

by Davide Cervone -
I thought PGcourse.pl was a standard macro that always included something thta allowed the "new version" button.

No, PGcourse.pl was meant as a place where you could put course-wide customization and other setup functions. It is useful for things like the "Show Source" button that we have in some example courses that allow you to view the source code of a problem, or (as in your case) adding the re-randomizing macros to all the files.