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

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

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

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

Legend:
Removed from v.283  
changed lines
  Added in v.284

aubreyja at gmail dot com
ViewVC Help
Powered by ViewVC 1.0.9