| … | |
… | |
| 4 | use strict; |
4 | use strict; |
| 5 | use warnings; |
5 | use warnings; |
| 6 | use WeBWorK::ContentGenerator; |
6 | use WeBWorK::ContentGenerator; |
| 7 | use WeBWorK::DB::WW; |
7 | use WeBWorK::DB::WW; |
| 8 | use Apache::Constants qw(:common); |
8 | use Apache::Constants qw(:common); |
| 9 | use CGI qw(-compile :html :form); |
9 | use CGI qw(); |
| 10 | |
10 | |
| 11 | sub initialize { |
11 | sub initialize { |
| 12 | my $self = shift; |
12 | my $self = shift; |
| 13 | my $courseEnvironment = $self->{courseEnvironment}; |
13 | my $courseEnvironment = $self->{courseEnvironment}; |
| 14 | |
14 | |
| … | |
… | |
| 34 | my $courseEnvironment = $self->{courseEnvironment}; |
34 | my $courseEnvironment = $self->{courseEnvironment}; |
| 35 | my $user = $r->param('user'); |
35 | my $user = $r->param('user'); |
| 36 | my $wwdb = $self->{wwdb}; |
36 | my $wwdb = $self->{wwdb}; |
| 37 | |
37 | |
| 38 | if (!defined $wwdb->getSets($user)) { |
38 | if (!defined $wwdb->getSets($user)) { |
| 39 | print "undefined".br; |
39 | print "undefined".CGI->br(); |
| 40 | } |
40 | } |
| 41 | |
41 | |
| 42 | my @setNames = $wwdb->getSets($user); |
42 | my @setNames = $wwdb->getSets($user); |
| 43 | |
43 | |
| 44 | print "Set Names<br>\n"; |
44 | print "Set Names", CGI->br(), "\n"; |
| 45 | print join(br."\n", @setNames); |
45 | print join(CGI->br()."\n", @setNames); |
| 46 | print p; |
46 | print CGI->p(); |
| 47 | |
47 | |
| 48 | print startform({-method=>"POST", -action=>$r->uri."set0/"}); |
48 | print CGI->startform({-method=>"POST", -action=>$r->uri."set0/"}); |
| 49 | print $self->hidden_authen_fields; |
49 | print $self->hidden_authen_fields; |
| 50 | print input({-type=>"submit", -value=>"Do Set 0"}); |
50 | print CGI->input({-type=>"submit", -value=>"Do Set 0"}); |
| 51 | print endform; |
51 | print CGI->endform(); |
| 52 | ""; |
52 | ""; |
| 53 | } |
53 | } |
| 54 | |
54 | |
| 55 | 1; |
55 | 1; |