Parent Directory
|
Revision Log
All of the content generators now work with the template system Moved the content generators into the WeBWorK::ContentGenerator namespace Added the default template and a few global.conf entries
1 package WeBWorK::ContentGenerator::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 title { 16 return "Welcome to Hell."; 17 } 18 19 sub body() { 20 my $self = shift; 21 my $r = $self->{r}; 22 my $course_env = $self->{courseEnvironment}; 23 24 # get some stuff together 25 my $user = $r->param("user"); 26 my $key = $r->param("key"); 27 my $uri = $r->uri; 28 29 print "<h1>There you go.</h1>","<p>You're now accessing $uri.</p>"; 30 31 print $self->print_form_data(""," = ","<br>\n"); 32 33 print "<hr><pre>"; 34 35 print $course_env->hash2string; 36 37 print "</pre>"; 38 39 print '<br><form method="POST" action="',$r->uri,'">'; 40 print $self->print_form_data('<input type="hidden" name="','" value = "',"\">\n"); 41 print '<input type="submit" value="repost"></form>'; 42 43 print '<form method="POST" action="',$r->uri,'">'; 44 print $self->print_form_data('<input type="hidden" name="','" value = "',"\">\n",qr/^key$/); 45 print "<input type=\"hidden\" name=\"key\" value=\"invalidkeyhahaha\">"; 46 print '<input type="submit" value="invalidate key"></form>'; 47 48 ""; 49 } 50 51 1;
| aubreyja at gmail dot com | ViewVC Help |
| Powered by ViewVC 1.0.9 |