## Forum archive 2000-2006

### Zbigniew Fiedorowicz - PG tip: define your own environment variables

by Arnold Pizer -
Number of replies: 0
 PG tip: define your own environment variables topic started 2/5/2001; 9:47:29 AMlast post 2/5/2001; 9:47:29 AM
 Zbigniew Fiedorowicz - PG tip: define your own environment variables  2/5/2001; 9:47:29 AM (reads: 2388, 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 |>