--- loncom/interface/createaccount.pm 2010/11/29 15:12:25 1.42
+++ loncom/interface/createaccount.pm 2010/12/08 05:28:48 1.45
@@ -3,7 +3,7 @@
# institutional log-in ID (institutional authentication required - localauth
# or kerberos) or an e-mail address.
#
-# $Id: createaccount.pm,v 1.42 2010/11/29 15:12:25 raeburn Exp $
+# $Id: createaccount.pm,v 1.45 2010/12/08 05:28:48 raeburn Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -284,7 +284,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');
}
@@ -1144,7 +1144,7 @@ sub invalid_state {
} elsif ($error eq 'userformat') {
$msg .= &mt('The e-mail address you provided may not be used as a username at this LON-CAPA institution.');
} elsif ($error eq 'captcha') {
- $msg .= &mt('Validation of the code your entered failed.');
+ $msg .= &mt('Validation of the code you entered failed.');
} elsif ($error eq 'noemails') {
$msg .= &mt('Creation of a new user account using an e-mail address as username is not permitted at this LON-CAPA institution.');
}
@@ -1152,16 +1152,22 @@ sub invalid_state {
if ($msgtext) {
$msg .= '
'.$msgtext;
}
- $msg .= &linkto_email_help($contact_email,$domdesc);
+ $msg .= &linkto_email_help($contact_email,$domdesc,$error);
return $msg;
}
sub linkto_email_help {
- my ($contact_email,$domdesc) = @_;
+ my ($contact_email,$domdesc,$error) = @_;
my $msg;
+ my $href = '/adm/helpdesk';
if ($contact_email ne '') {
my $escuri = &HTML::Entities::encode('/adm/createaccount','&<>"');
- $msg .= '
'.&mt('You may wish to contact the [_1]LON-CAPA helpdesk[_2] for [_3].','','',$domdesc).'
';
+ $href .= '?origurl='.$escuri;
+ if ($error eq 'existinguser') {
+ my $escemail = &HTML::Entities::encode($env{'form.useremail'});
+ $href .= '&useremail='.$escemail.'&useraccount='.$escemail;
+ }
+ $msg .= '
'.&mt('You may wish to contact the [_1]LON-CAPA helpdesk[_2] for [_3].','','',$domdesc).'
';
} else {
$msg .= '
'.&mt('You may wish to send an e-mail to the server administrator: [_1] for [_2].',$Apache::lonnet::perlvar{'AdminEmail'},$domdesc).'
';
}