[system] / trunk / webwork2 / lib / WeBWorK / Test.pm Repository:
ViewVC logotype

Annotation of /trunk/webwork2/lib/WeBWorK/Test.pm

Parent Directory Parent Directory | Revision Log Revision Log


Revision 288 - (view) (download) (as text)

1 : malsyned 283 package WeBWorK::Test;
2 :    
3 : sh002i 288 use Apache::Request;
4 :     use Apache::Constants qw(:common);
5 :    
6 : sh002i 284 sub new($$$$$) {
7 :     my $class = shift;
8 :     my ($r, $courseEnvironment, $user, $key) = @_;
9 :    
10 :     my $self = {
11 : sh002i 287 r => $r,
12 : sh002i 284 courseEnvironment => $courseEnvironment,
13 :     user => $user,
14 :     key => $key,
15 :     };
16 : sh002i 286 bless $self, $class;
17 :     return $self;
18 : sh002i 284 }
19 : malsyned 283
20 : sh002i 288 sub go($) {
21 : sh002i 284 my $self = shift;
22 : sh002i 287 $self->{r}->content_type("text/html");
23 :     $self->{r}->send_http_header;
24 :    
25 :     # get some stuff together
26 :     my $user = $self->{user};
27 :     my $key = $self->{key};
28 :    
29 : sh002i 284 print<<EOT;
30 : malsyned 283 <html>
31 :     <head><title>Welcome to Hell.</title></head>
32 :     <body>
33 :     <h1>There you go.</h1>
34 : sh002i 284 <pre>
35 : sh002i 287 user = $user
36 :     key = $key
37 : sh002i 284 </pre>
38 : malsyned 283 </body>
39 :     </html>
40 :     EOT
41 : sh002i 288
42 :     return OK;
43 : malsyned 283 }
44 :    
45 :     1;

aubreyja at gmail dot com
ViewVC Help
Powered by ViewVC 1.0.9