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

Diff of /trunk/webwork2/lib/WeBWorK/ContentGenerator/Login.pm

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

Revision 442 Revision 443
9 9
10use strict; 10use strict;
11use warnings; 11use warnings;
12use WeBWorK::ContentGenerator; 12use WeBWorK::ContentGenerator;
13use Apache::Constants qw(:common); 13use Apache::Constants qw(:common);
14use CGI qw(-comple :html :form); 14use CGI qw();
15 15
16our @ISA = qw(WeBWorK::ContentGenerator); 16our @ISA = qw(WeBWorK::ContentGenerator);
17 17
18sub title { 18sub title {
19 return "Login"; 19 return "Login";
32 # WeBWorK::Authen::verify will set the note "authen_error" 32 # WeBWorK::Authen::verify will set the note "authen_error"
33 # if invalid authentication is found. If this is done, it's a signal to 33 # if invalid authentication is found. If this is done, it's a signal to
34 # us to yell at the user for doing that, since Authen isn't a content- 34 # us to yell at the user for doing that, since Authen isn't a content-
35 # generating module. 35 # generating module.
36 if ($r->notes("authen_error")) { 36 if ($r->notes("authen_error")) {
37 print font({-color => 'red'}, b($r->notes("authen_error"))),br; 37 print CGI->font({-color => 'red'}, CGI->b($r->notes("authen_error"))),CGI->br();
38 } 38 }
39 39
40 print p("Please enter your username and password for ",b($course)," below:"); 40 print p("Please enter your username and password for ",CGI->b($course)," below:");
41 print startform({-method=>"POST", -action=>$r->uri}); 41 print CGI->startform({-method=>"POST", -action=>$r->uri});
42 42
43 # write out the form data posted to the requested URI 43 # write out the form data posted to the requested URI
44 print $self->print_form_data('<input type="hidden" name="','" value="',"\"/>\n",qr/^(user|passwd|key)$/); 44 print $self->print_form_data('<input type="hidden" name="','" value="',"\"/>\n",qr/^(user|passwd|key)$/);
45 45
46 print 46 print
47 table({-border => 0}, 47 CGI->table({-border => 0},
48 Tr([ 48 CGI->Tr([
49 td([ 49 CGI->td([
50 "Username:", 50 "Username:",
51 input({-type=>"textfield", -name=>"user", -value=>"$user"}),br, 51 CGI->input({-type=>"textfield", -name=>"user", -value=>"$user"}),CGI->br(),
52 ]), 52 ]),
53 td([ 53 CGI->td([
54 "Password:", 54 "Password:",
55 input({-type=>"password", -name=>"passwd", -value=>"$passwd"}) . i("(Will not be echoed)"), 55 CGI->input({-type=>"password", -name=>"passwd", -value=>"$passwd"}) . CGI->i("(Will not be echoed)"),
56 ]), 56 ]),
57 ]) 57 ])
58 ) 58 )
59 ; 59 ;
60 60
61 print input({-type=>"submit", -value=>"Continue"}); 61 print CGI->input({-type=>"submit", -value=>"Continue"});
62 print endform; 62 print CGI->endform();
63 63
64 return ""; 64 return "";
65} 65}
66 66
671; 671;

Legend:
Removed from v.442  
changed lines
  Added in v.443

aubreyja at gmail dot com
ViewVC Help
Powered by ViewVC 1.0.9