[system] / trunk / webwork-modperl / lib / WeBWorK / Test.pm Repository:
ViewVC logotype

View of /trunk/webwork-modperl/lib/WeBWorK/Test.pm

Parent Directory Parent Directory | Revision Log Revision Log


Revision 329 - (download) (as text) (annotate)
Thu May 30 22:12:51 2002 UTC (10 years, 11 months ago) by malsyned
File size: 1508 byte(s)
-Just a quick end of the day commit.  No big changes to report.
--Dennis

    1 package WeBWorK::Test;
    2 
    3 # This file will cease to be as soon as the real content generation modules
    4 # have been written.  However, there's always reason to keep it around, as
    5 # it showcases many things that new content generators will want to do,
    6 # since it's generally where I dump new functionality before I put it in any
    7 # end-user modules.
    8 
    9 use Apache::Request;
   10 use Apache::Constants qw(:common);
   11 use WeBWorK::ContentGenerator;
   12 
   13 our @ISA = qw(WeBWorK::ContentGenerator);
   14 
   15 sub go() {
   16   my $self = shift;
   17   my $r = $self->{r};
   18   my $course_env = $self->{courseEnvironment};
   19   $r->content_type("text/html");
   20   $r->send_http_header;
   21 
   22   # get some stuff together
   23   my $user = $r->param("user");
   24   my $key = $r->param("key");
   25   my $uri = $r->uri;
   26 
   27 print<<EOT;
   28 <html>
   29 <head><title>Welcome to Hell.</title></head>
   30 <body>
   31 <h1>There you go.</h1>
   32 <p>You're now accessing $uri.</p>
   33 EOT
   34   $self->print_form_data(""," = ","<br>");
   35 
   36   print "<hr><pre>";
   37 
   38   print $course_env->hash2string;
   39 
   40   print "</pre>";
   41 
   42   print '<br><form method="POST" action="',$r->uri,'">';
   43   $self->print_form_data('<input type="hidden" name="','" value = "',"\">\n");
   44   print '<input type="submit" value="repost"></form>';
   45 
   46   print '<form method="POST" action="',$r->uri,'">';
   47   $self->print_form_data('<input type="hidden" name="','" value = "',"\">\n",qr/^key$/);
   48   print "<input type=\"hidden\" name=\"key\" value=\"invalidkeyhahaha\">";
   49   print '<input type="submit" value="invalidate key"></form>';
   50 
   51 
   52 print<<EOT;
   53 </body>
   54 </html>
   55 EOT
   56 
   57   return OK;
   58 }
   59 
   60 1;

aubreyja at gmail dot com
ViewVC Help
Powered by ViewVC 1.0.9