Forum archive 2000-2006

Lars Jensen - Printout of CVS archive problems

Lars Jensen - Printout of CVS archive problems

by Arnold Pizer -
Number of replies: 0
inactiveTopicPrintout of CVS archive problems topic started 5/3/2003; 1:30:38 PM
last post 5/5/2003; 10:45:48 AM
userLars Jensen - Printout of CVS archive problems  blueArrow
5/3/2003; 1:30:38 PM (reads: 1152, responses: 4)
What is the easiest way of getting a printout of a problem set downloaded from CVS? I'm trying to look at some of the problems on CVS, but find it hard to get the printout. Some questions in this regard:

Is it possible to build sets that have their definition files located some place other than in the /usr/local/webwork/templates directory?

It would be nice to have this feature because it would allow to do a cvs download to a subdirectory and then to build the problem set. It is messy to copy non-rochester_problib problems to templates because one have to worry about overwriting existing content.

Am I missing something here?

Thanks for any help. Lars.

<| Post or View Comments |>


userMichael Gage - Re: Printout of CVS archive problems  blueArrow
5/4/2003; 7:34:35 PM (reads: 1357, responses: 0)
Hi Lars,

The answer to what I think is your second question is yes. The set definition files themselves must be in /usr/local/webwork/templates, however the .pg files can be in other places. For example, put a link(alias) called library in /user/local/webwork/templates (the link can point anywhere, e.g. /usr/local/webwork/rochester_problib) Then the problems listed in a setdefinition file: setTestRochesterProblems

would have problem entries such as

library/setAlgebra1RealNumbers/srw1_1_21-28.pg , 1 library/setAlgebra5Equations/srw1_5_14.pg, 1

You can build this set and printout a hardcopy to see the problems.

You can also use the same addressing scheme in any set definition file.

If you don't want to use a link, you can actually create a subdirectory of /usr/local/webwork/templates (call it /usr/local/webwork/templates/library or /usr/local/webwork/templates/rochester_problib) and place the problems there.

The address of the problem in the set definition file is relative to /usr/local/webwork/templates, but that is the only requirement. I suspect that even something like

../../rochester_lib/setAlgebra5Equations/srw1_5_14.pg, 1

would work, although I recommend using the link approach instead -- it's less likely to cause mistakes.

As to getting printouts to problems from the rochester problem database, you might like to look at another view of the problem library at http://webhost.math.rochester.edu/webworkdocs/ww/listLib?command=setsOnly

If you go to something like http://webhost.math.rochester.edu/webworkdocs/ww/listLib?command=listSet&set=setAlgebra1RealNumbers

you can select any problems in the set that you wish, and create a PDF printout of just those problems. Unfortunately, at the moment you can only obtain a printout of problems that come from a single set. You can't mix problems from different sets.

If it would be useful to have a more flexible method of printing PDF files for selecting problems, I'm sure that I can arrange it. What I would like is a description of the user interface that would be desired. Once that is in place, the rest should be pretty easy to implement.

--Mike

<| Post or View Comments |>


userLars Jensen - Re: Printout of CVS archive problems  blueArrow
5/5/2003; 4:04:28 AM (reads: 1350, responses: 0)
Hi Mike,

Thanks for your answer.

Does your answer imply that if I want to mix libraries, I must edit/rename the set definition files in the cases where two different libraries contains sets with identical names? (I was looking for a way to avoid having to do this.)

Lars.

<| Post or View Comments |>


userMichael Gage - Re: Printout of CVS archive problems  blueArrow
5/5/2003; 8:09:13 AM (reads: 1363, responses: 0)
You need some way of specifying uniquely which .pg problem you want.

You could have directories (within the templates directory) named rochester_problib indiana_problib nevada_problib. Then in the set definition file use

rochester_problib/setAlgebra1/prob1.pg , 1 indiana_problib/setAlgebra1/prob1.pg , 1 nevada_problib/setAlgebra1/prob1.pg , 1

to obtain three completely different problems. You do need to edit the set definition files to switch from one library to another.

You could also create a link in the templates directory to the rochester library

ln -s rochester_problib library

and then use

library/setAlgebra1/prob1.pg, 1

in the set definition file.

If you use this strategy throughout the set definitions, then you could switch to the indiana version of the problem library by simply changing the link:

ln -s indiana_problib library

(or more likely you would use this trick to switch from an old version of the rochester library to a new version where problems have been improved and debugged). The only change that needs to be made here is the definition of the link. The set definition file doesn't need to be changed at all. In this case the problem sets don't need to be rebuilt either. The CGI scripts will follow the links to the new directory when rendering a problem.

--Mike

<| Post or View Comments |>


userArnold K. Pizer - Re: Printout of CVS archive problems  blueArrow
5/5/2003; 10:45:48 AM (reads: 1367, responses: 0)
Hi Lars,

Your original question was "What is the easiest way of getting a printout of a problem set downloaded from CVS?". Here is another option which is the one we use for http://webwork.math.rochester.edu/courses/WW_Prob_Lib_CVS/. This course contains a pretty much upto date version of the Rochester CVS problem library. Note that anyone can log into this course as practice3 and get a printout (with filenames) of all the current sets (but you as a student can only get printouts of one set at a time).

To do this for yourself first create a new "WW_Prob_Lib_CVS" course and make sure it works. Then set up the templates directory under CVS. For this see Mike's recent instructions http://webhost.math.rochester.edu/webworkdocs/discuss/msgReader$1503. Next edit the webworkCourse.ph file adding $allowDestroyRebuildProbSets = 1; Finally if you have a fast server and downloading 20 sets at a time is not sufficient for your needs, edit Global.pm changing $max_num_of_ps_downloads_allowed from 20 to whatever you want. The Rochester CVS problem library currently contains 212 so setting this to 300 should suffice for awhile.

Then to get a current version of the Rochester problem library, in the templates directory just run the command
cvs update -d
Don't forget the "-d" option which gives you all the new directories.

Then delete all the sets and build them again. Note that if you do this in one operation ("destroy and rebuild"), you will only rebuild sets that you already have and you will not build any new sets that have been added. If you like doing things on the server, a quick way to delete all sets is to remove the WW_Prob_Lib_CVS_webwork_DB file.

Now you can select and download all the sets you want.

If you want to do this for all the problem libraries you can either set up an individual course for each library or create various templates directories (templates_Rochester, templates_Arizona, templates_Dartmouth, etc) and then switch between them with a link pointing e.g. from templates to templates_Rochester.

Arnie

<| Post or View Comments |>