| 1 | package WeBWorK::Test; |
1 | package WeBWorK::Test; |
| 2 | |
2 | |
| 3 | # print() the page requested. |
3 | sub new($$$$$) { |
| 4 | # args: form data, course-env |
4 | my $class = shift; |
| 5 | sub gen_page() { |
5 | my ($r, $courseEnvironment, $user, $key) = @_; |
| 6 | print<<EOT; |
6 | |
| 7 | Content-type: text/html |
7 | my $self = { |
|
|
8 | request => $r, |
|
|
9 | courseEnvironment => $courseEnvironment, |
|
|
10 | user => $user, |
|
|
11 | key => $key, |
|
|
12 | }; |
|
|
13 | } |
| 8 | |
14 | |
|
|
15 | sub go { |
|
|
16 | my $self = shift; |
|
|
17 | $self{request}->content_type("text/html"); |
|
|
18 | $self{request}->send_http_header; |
|
|
19 | print<<EOT; |
| 9 | <html> |
20 | <html> |
| 10 | <head><title>Welcome to Hell.</title></head> |
21 | <head><title>Welcome to Hell.</title></head> |
| 11 | <body> |
22 | <body> |
| 12 | <h1>There you go.</h1> |
23 | <h1>There you go.</h1> |
|
|
24 | <pre> |
|
|
25 | user = $self{user} |
|
|
26 | key = $self{key} |
|
|
27 | </pre> |
| 13 | </body> |
28 | </body> |
| 14 | </html> |
29 | </html> |
| 15 | EOT |
30 | EOT |
| 16 | } |
31 | } |
| 17 | |
32 | |