| … | |
… | |
| 31 | # |
31 | # |
| 32 | # WeBWorK::ContentGenerator::WHATEVER->new($r, $ce)->go(@whatever); |
32 | # WeBWorK::ContentGenerator::WHATEVER->new($r, $ce)->go(@whatever); |
| 33 | # |
33 | # |
| 34 | # and throws away the result ;) |
34 | # and throws away the result ;) |
| 35 | # |
35 | # |
| 36 | sub new($$$) { |
36 | sub new($$$$) { |
| 37 | my ($invocant, $r, $ce) = @_; |
37 | my ($invocant, $r, $ce, $db) = @_; |
| 38 | my $class = ref($invocant) || $invocant; |
38 | my $class = ref($invocant) || $invocant; |
| 39 | my $self = { |
39 | my $self = { |
| 40 | r => $r, |
40 | r => $r, |
| 41 | ce => $ce, |
41 | ce => $ce, |
| 42 | db => WeBWorK::DB->new($ce), |
42 | db => $db, |
| 43 | }; |
43 | }; |
| 44 | bless $self, $class; |
44 | bless $self, $class; |
| 45 | return $self; |
45 | return $self; |
| 46 | } |
46 | } |
| 47 | |
47 | |