WeBWorKdocs

sq_webwork:


Home
Current UR courses
Visitor page
Intro to WeBWorK
WeBWorK 2 Twiki
WW Community
Grant Support & awards
Discussion group
Problem library
Write/modify problems
Create & manage course
Tutorial on running a course
HowTos
FAQ
WeBWorK2 FAQ
Software Download
How to Install WW server
Feedback
Site Map
Change preferences
Change password






Previous topic: Next topic:
inactiveTopic PG tip: define your own environment variables topic started 2/5/2001; 9:47:29 AM
last post 2/5/2001; 9:47:29 AM
user Zbigniew Fiedorowicz - PG tip: define your own environment variables  blueArrow
2/5/2001; 9:47:29 AM (reads: 2620, responses: 0)
A long list of predefined PG environment variables useful for writing problems is given at

webhost.math.rochester.edu/webworkdocs/docs/pglanguage/reference/environmentvariables

However there is an undocumented feature of WeBWorK which I found very useful: you can define your own PG environment variables in the course configuration file webworkCourse.ph

The way I use it is by inserting lines like

$PG_environment{'termYear'} = 'Winter 2001';

into webworkCourse.ph. Then I use $termYear in paperHeader.pg files for all my problem sets. That way I don't have to hard code this information into the header files, saving me the trouble of reediting all those files at the beginning of each academic term. I just need to edit one line in webworkCourse.ph

I would suggest that this feature be explicitly documented and that the WeBWorK problem library header files incorporate this mechanism.

Zig Fiedorowicz

<| Post or View Comments |>



Last update: Monday, February 5, 2001 at 9:47:29 AM.
This site maintained using Manila and Frontier software.