[system] / branches / rel-2-1-a1 / webwork-modperl / lib / WeBWorK / ContentGenerator / Login.pm Repository:
ViewVC logotype

Diff of /branches/rel-2-1-a1/webwork-modperl/lib/WeBWorK/ContentGenerator/Login.pm

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

Revision 2535 Revision 2536
1################################################################################ 1################################################################################
2# WeBWorK Online Homework Delivery System 2# WeBWorK Online Homework Delivery System
3# Copyright © 2000-2003 The WeBWorK Project, http://openwebwork.sf.net/ 3# Copyright © 2000-2003 The WeBWorK Project, http://openwebwork.sf.net/
4# $CVSHeader: webwork-modperl/lib/WeBWorK/ContentGenerator/Login.pm,v 1.21 2004/01/25 18:16:27 gage Exp $ 4# $CVSHeader: webwork2/lib/WeBWorK/ContentGenerator/Login.pm,v 1.23 2004/07/08 21:38:09 sh002i Exp $
5# 5#
6# This program is free software; you can redistribute it and/or modify it under 6# This program is free software; you can redistribute it and/or modify it under
7# the terms of either: (a) the GNU General Public License as published by the 7# the terms of either: (a) the GNU General Public License as published by the
8# Free Software Foundation; either version 2, or (at your option) any later 8# Free Software Foundation; either version 2, or (at your option) any later
9# version, or (b) the "Artistic License" which comes with this package. 9# version, or (b) the "Artistic License" which comes with this package.
105 EOT 105 EOT
106 106
107 print CGI::startform({-method=>"POST", -action=>$r->uri}); 107 print CGI::startform({-method=>"POST", -action=>$r->uri});
108 108
109 # write out the form data posted to the requested URI 109 # write out the form data posted to the requested URI
110 print $self->print_form_data('<input type="hidden" name="','" value="',"\"/>\n",qr/^(user|passwd|key|force_passwd_authen)$/); 110 #print $self->print_form_data('<input type="hidden" name="','" value="',"\"/>\n",qr/^(user|passwd|key|force_passwd_authen)$/);
111
112 # preserve the form data posted to the requested URI
113 my @fields_to_print = grep { not m/^(user|passwd|key|force_passwd_authen)$/ } $r->param;
114 print $self->hidden_fields(@fields_to_print);
111 115
112 print CGI::table({class=>"FormLayout"}, 116 print CGI::table({class=>"FormLayout"},
113 CGI::Tr([ 117 CGI::Tr([
114 CGI::td([ 118 CGI::td([
115 "Username:", 119 "Username:",
133 print CGI::endform(); 137 print CGI::endform();
134 138
135 # form for guest login 139 # form for guest login
136 if (grep m/^$practiceUserPrefix/, $db->listUsers) { 140 if (grep m/^$practiceUserPrefix/, $db->listUsers) {
137 print CGI::startform({-method=>"POST", -action=>$r->uri}); 141 print CGI::startform({-method=>"POST", -action=>$r->uri});
138 print $self->print_form_data('<input type="hidden" name="','" value="',"\"/>\n",qr/^(user|passwd|key|force_passwd_authen)$/); 142
143 # preserve the form data posted to the requested URI
144 my @fields_to_print = grep { not m/^(user|passwd|key|force_passwd_authen)$/ } $r->param;
145 print $self->hidden_fields(@fields_to_print);
146
139 print CGI::p(dequote <<" EOT"); 147 print CGI::p(dequote <<" EOT");
140 This course supports guest logins. Click ${\( CGI::b("Guest Login") )} 148 This course supports guest logins. Click ${\( CGI::b("Guest Login") )}
141 to log into this course as a guest. 149 to log into this course as a guest.
142 EOT 150 EOT
143 print CGI::input({-type=>"submit", -name=>"login_practice_user", -value=>"Guest Login"}); 151 print CGI::input({-type=>"submit", -name=>"login_practice_user", -value=>"Guest Login"});
152
144 print CGI::endform(); 153 print CGI::endform();
145 } 154 }
146 155
147 return ""; 156 return "";
148} 157}

Legend:
Removed from v.2535  
changed lines
  Added in v.2536

aubreyja at gmail dot com
ViewVC Help
Powered by ViewVC 1.0.9