--- loncom/interface/createaccount.pm 2010/12/06 02:39:59 1.37.2.7
+++ loncom/interface/createaccount.pm 2010/12/24 20:36:11 1.40.2.3
@@ -3,7 +3,7 @@
# institutional log-in ID (institutional authentication required - localauth
# or kerberos) or an e-mail address.
#
-# $Id: createaccount.pm,v 1.37.2.7 2010/12/06 02:39:59 raeburn Exp $
+# $Id: createaccount.pm,v 1.40.2.3 2010/12/24 20:36:11 raeburn Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -39,7 +39,7 @@ use Apache::lonhtmlcommon;
use Apache::lonlocal;
use Apache::lonauth;
use Apache::resetpw;
-use Captcha::reCAPTCHA;
+use Authen::Captcha;
use DynaLoader; # for Crypt::DES version
use Crypt::DES;
use LONCAPA qw(:DEFAULT :match);
@@ -139,8 +139,6 @@ sub handler {
$start_page =
&Apache::loncommon::start_page($title,$js,
{'no_inline_link' => 1,});
-
- my $inventory = uc($domain);
my %domconfig =
&Apache::lonnet::get_dom('configuration',['usercreation'],$domain);
my ($cancreate,$statustocreate) = &get_creation_controls($domain,$domconfig{'usercreation'});
@@ -148,7 +146,7 @@ sub handler {
&print_header($r,$start_page,$courseid);
my $output = '
'.&mt('Account creation unavailable').'
'.
''.
- &mt('Creation of a new user account using an e-mail address or an institutional log-in ID as username is not permitted for the [_1] WebCenter.',$inventory).'
';
+ &mt('Creation of a new user account using an e-mail address or an institutional log-in ID as username is not permitted at this institution ([_1]).',$domdesc).'
';
$r->print($output);
&print_footer($r);
return OK;
@@ -180,7 +178,7 @@ sub handler {
if ($token) {
($output,$nostart,$noend) =
&process_mailtoken($r,$token,$contact_name,$contact_email,$domain,
- $domdesc,$lonhost,$include,$start_page,$inventory);
+ $domdesc,$lonhost,$include,$start_page);
if ($nostart) {
if ($noend) {
return OK;
@@ -227,7 +225,7 @@ sub handler {
$output = &process_email_request($env{'form.useremail'},$domain,$domdesc,
$contact_name,$contact_email,$cancreate,
$lonhost,$domconfig{'usercreation'},
- $courseid,$inventory);
+ $courseid);
} elsif (!$token) {
&print_header($r,$start_page,$courseid);
my $now=time;
@@ -287,7 +285,7 @@ sub selfenroll_crumbs {
}
my $last_crumb;
if ($desc ne '') {
- $last_crumb = &mt('Self-enroll in [_1]',''.$desc.'');
+ $last_crumb = &mt('Self-enroll in [_1]',"$desc");
} else {
$last_crumb = &mt('Self-enroll');
}
@@ -375,13 +373,6 @@ function validate_email() {
if (validmail(field) == false) {
alert("$lt{'email'}: "+field.value+" $lt{'notv'}.");
return false;
- } else {
- var emailaddr = field.value;
- var lcemail = emailaddr.toLowerCase();
- if (emailaddr != lcemail) {
- field.value = lcemail;
- alert("WebCenter usernames are all lower case.\\nAccordingly your username will be "+lcemail+" once activated.");
- }
}
return true;
}
@@ -411,7 +402,7 @@ sub print_username_form {
}
if (grep(/^email$/,@{$cancreate})) {
$output .= '
'.&mt('Create account with an e-mail address as your username').'
';
- my $captchaform = &create_recaptcha();
+ my $captchaform = &create_captcha();
if ($captchaform) {
my $submit_text = &mt('Request LON-CAPA account');
my $emailform = '';
@@ -428,8 +419,7 @@ sub print_username_form {
&Apache::lonhtmlcommon::row_closure(1).
&Apache::lonhtmlcommon::row_title(&mt('Validation'),
'LC_pick_box_title')."\n".
- $captchaform."\n".
- &mt('If either word is hard to read, [_1] will replace them.','').'
';
+ $captchaform."\n".'
';
if ($courseid ne '') {
$output .= ''."\n";
}
@@ -470,13 +460,12 @@ sub login_box {
);
my ($lkey,$ukey) = &Apache::lonpreferences::des_keys();
my ($lextkey,$uextkey) = &getkeys($lkey,$ukey);
- my $logtoken=Apache::lonnet::reply('tmpput:'.$ukey.$lkey.'&createaccount',
+ my $logtoken=Apache::lonnet::reply('tmpput:'.$ukey.$lkey.'&createaccount:createaccount',
$lonhost);
$output = &serverform($logtoken,$lonhost,undef,$courseid,$context);
my $unameform = '';
my $upassform = '';
$output .= '