| 1 | ################################################################################ |
1 | ################################################################################ |
| 2 | # WeBWorK Online Homework Delivery System |
2 | # WeBWorK Online Homework Delivery System |
| 3 | # Copyright © 2000-2003 The WeBWorK Project, http://openwebwork.sf.net/ |
3 | # Copyright © 2000-2003 The WeBWorK Project, http://openwebwork.sf.net/ |
| 4 | # $CVSHeader: webwork-modperl/lib/WeBWorK.pm,v 1.53 2004/03/16 20:00:23 sh002i Exp $ |
4 | # $CVSHeader: webwork-modperl/lib/WeBWorK.pm,v 1.54 2004/03/23 01:04:02 sh002i Exp $ |
| 5 | # |
5 | # |
| 6 | # This program is free software; you can redistribute it and/or modify it under |
6 | # This program is free software; you can redistribute it and/or modify it under |
| 7 | # the terms of either: (a) the GNU General Public License as published by the |
7 | # the terms of either: (a) the GNU General Public License as published by the |
| 8 | # Free Software Foundation; either version 2, or (at your option) any later |
8 | # Free Software Foundation; either version 2, or (at your option) any later |
| 9 | # version, or (b) the "Artistic License" which comes with this package. |
9 | # version, or (b) the "Artistic License" which comes with this package. |
| … | |
… | |
| 35 | =cut |
35 | =cut |
| 36 | |
36 | |
| 37 | BEGIN { $main::VERSION = "2.0"; } |
37 | BEGIN { $main::VERSION = "2.0"; } |
| 38 | |
38 | |
| 39 | |
39 | |
| 40 | my $timingON = 1; |
40 | my $timingON = 0; |
| 41 | |
41 | |
| 42 | use strict; |
42 | use strict; |
| 43 | use warnings; |
43 | use warnings; |
| 44 | use Apache::Constants qw(:common REDIRECT DONE); |
44 | use Apache::Constants qw(:common REDIRECT DONE); |
| 45 | use WeBWorK::Authen; |
45 | use WeBWorK::Authen; |
| 46 | use WeBWorK::Authz; |
46 | use WeBWorK::Authz; |
| 47 | use WeBWorK::CourseEnvironment; |
47 | use WeBWorK::CourseEnvironment; |
| 48 | use WeBWorK::DB; |
48 | use WeBWorK::DB; |
| 49 | #use WeBWorK::Timing; |
49 | use WeBWorK::Timing; |
| 50 | use WeBWorK::Upload; |
50 | use WeBWorK::Upload; |
| 51 | use WeBWorK::Utils qw(runtime_use); |
51 | use WeBWorK::Utils qw(runtime_use); |
| 52 | use WeBWorK::Request; |
52 | use WeBWorK::Request; |
| 53 | use WeBWorK::URLPath; |
53 | use WeBWorK::URLPath; |
| 54 | |
54 | |
| … | |
… | |
| 231 | my $instance = $displayModule->new($r); |
231 | my $instance = $displayModule->new($r); |
| 232 | |
232 | |
| 233 | debug("...and call it:\n"); |
233 | debug("...and call it:\n"); |
| 234 | debug("-------------------- call to ${displayModule}::go\n"); |
234 | debug("-------------------- call to ${displayModule}::go\n"); |
| 235 | |
235 | |
|
|
236 | $WeBWorK::timer = WeBWorK::Timing->new("$displayArgs{courseID}") if $timingON; |
|
|
237 | $WeBWorK::timer -> start() if $timingON; |
| 236 | my $result = $instance->go(); |
238 | my $result = $instance->go(); |
| 237 | |
239 | |
| 238 | debug("-------------------- call to ${displayModule}::go\n"); |
240 | debug("-------------------- call to ${displayModule}::go\n"); |
| 239 | |
241 | |
| 240 | debug("returning result: " . (defined $result ? $result : "UNDEF") . "\n"); |
242 | debug("returning result: " . (defined $result ? $result : "UNDEF") . "\n"); |
| 241 | |
243 | $WeBWorK::timer -> save() if $timingON; |
| 242 | return $result; |
244 | return $result; |
|
|
245 | |
| 243 | } |
246 | } |
| 244 | |
247 | |
| 245 | sub mungeParams { |
248 | sub mungeParams { |
| 246 | my ($r) = @_; |
249 | my ($r) = @_; |
| 247 | |
250 | |