WeBWorK::PG::Environment

This is a substitute for the CourseEnvironment module on the webwork2 side. It loads configuration options needed for PG. This is used in WeBWorK::PG and WeBWorK::PG::IO.

The configuration is initially loaded from $ENV{PG_ROOT}/conf/pg_config.dist.yml. If it is desired to change the default values, then copy the $ENV{PG_ROOT}/conf/pg_config.dist.yml to $ENV{PG_ROOT}/conf/pg_config.yml, and make changes in the copy. The default values will be overriden with the changed values in the copy. Note that invalid values added to the copy will cause a warning to be issued.

If the the WeBWorK::CourseEnvironment module is found, then the configuration options are overridden with the values from a webwork2 course environment instance. This is provided to maintain compatibility with webwork2, and should be removed at the end of life for webwork2.

Optionally a course name may be provided to use the webwork2 course environment for that course.

Note that the only values used in WeBWorK::PG::IO are $pg_envir->{directories}{permitted_read_dir}, $pg_envir->{directories}{tmp}, and the programs in the $pg_envir->{externalPrograms} hash.

Also note that for the standalone renderer this is used in WeBWorK::PG::Translator, and there the values of $pg_envir->{directories}{root} and $pg_envir->{modules} are used.