| … | |
… | |
| 61 | } |
61 | } |
| 62 | |
62 | |
| 63 | # Create the @components array, which contains the path specified in the URL |
63 | # Create the @components array, which contains the path specified in the URL |
| 64 | my($junk, @components) = split "/", $path_info; |
64 | my($junk, @components) = split "/", $path_info; |
| 65 | my $webwork_root = $r->dir_config('webwork_root'); # From a PerlSetVar in httpd.conf |
65 | my $webwork_root = $r->dir_config('webwork_root'); # From a PerlSetVar in httpd.conf |
|
|
66 | my $pg_root = $r->dir_config('pg_root'); # From a PerlSetVar in httpd.conf |
| 66 | my $course = shift @components; |
67 | my $course = shift @components; |
| 67 | |
68 | |
| 68 | # Try to get the course environment. |
69 | # Try to get the course environment. |
| 69 | my $ce = eval {WeBWorK::CourseEnvironment->new($webwork_root, $urlRoot, $course);}; |
70 | my $ce = eval {WeBWorK::CourseEnvironment->new($webwork_root, $urlRoot, $pg_root, $course);}; |
| 70 | if ($@) { # If there was an error getting the requested course |
71 | if ($@) { # If there was an error getting the requested course |
| 71 | # TODO: display an error page. For now, 404 it. |
72 | # TODO: display an error page. For now, 404 it. |
| 72 | warn $@; |
73 | warn $@; |
| 73 | return DECLINED; |
74 | return DECLINED; |
| 74 | } |
75 | } |