I've changed the way WeBWorK is configured yet again. The Apache
configuration for WeBWorK is now done with <Perl> sections. This solves
the problem of "seeding" global.conf with initial values for the various
root directories and base URLs. it also eliminates redundancy in the
Apache configuration file itself.
The Apache configuration for WeBWorK is now contained in the file
conf/webwork.apache-config. This file is used both for normal systems,
where WeBWorK is integrated into the main Apache server, and development
systems, where each developer runs his or her own Apache server.
Inside webwork.apache-config, seven configuation variables are set:
$webwork_url The base URL handled by Apache::WeBWorK.
$webwork_dir The path to the base webwork2 directory.
$pg_dir The path to the base pg directory.
$webwork_htdocs_url The base URL of the WeBWorK htdocs directory.
$webwork_htdocs_dir The path to the WeBWorK htdocs directory.
$webwork_courses_url The base URL of the WeBWorK courses directory.
$webwork_courses_dir The path to the WeBWorK courses directory.
These variables are used to configure the <Location>, Alias, AliasMatch,
and <Directory> directives necessary for WeBWorK operation.
$webwork_root and $pg_root are also used in "use lib" lines to add the
WeBWorK and PG lib directories to @INC.
Additionally, the above values are shared with WeBWorK via the
%WeBWorK::SeedCE hash. WeBWorK.pm passes the contents of this hash
(along with a value for "courseName") to CourseEnvironment.pm when
initializing the course environment. In turn, CourseEnvironment.pm seeds
the course environment namespace with these variables before evaluating
global.conf and course.conf.