--- loncom/interface/createaccount.pm 2010/12/02 22:51:27 1.37.2.6 +++ loncom/interface/createaccount.pm 2010/12/06 02:39:59 1.37.2.7 @@ -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.6 2010/12/02 22:51:27 raeburn Exp $ +# $Id: createaccount.pm,v 1.37.2.7 2010/12/06 02:39:59 raeburn Exp $ # # Copyright Michigan State University Board of Trustees # @@ -140,6 +140,7 @@ sub handler { &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'}); @@ -147,7 +148,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 GCI WebCenter.').'

'; + &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).'

'; $r->print($output); &print_footer($r); return OK; @@ -179,7 +180,7 @@ sub handler { if ($token) { ($output,$nostart,$noend) = &process_mailtoken($r,$token,$contact_name,$contact_email,$domain, - $domdesc,$lonhost,$include,$start_page); + $domdesc,$lonhost,$include,$start_page,$inventory); if ($nostart) { if ($noend) { return OK; @@ -226,7 +227,7 @@ sub handler { $output = &process_email_request($env{'form.useremail'},$domain,$domdesc, $contact_name,$contact_email,$cancreate, $lonhost,$domconfig{'usercreation'}, - $courseid); + $courseid,$inventory); } elsif (!$token) { &print_header($r,$start_page,$courseid); my $now=time; @@ -504,7 +505,7 @@ sub login_box { sub process_email_request { my ($useremail,$domain,$domdesc,$contact_name,$contact_email,$cancreate, - $server,$settings,$courseid) = @_; + $server,$settings,$courseid,$inventory) = @_; $useremail = lc($env{'form.useremail'}); my $output; if (ref($cancreate) eq 'ARRAY') { @@ -563,7 +564,7 @@ sub process_email_request { } } $output = &send_token($domain,$useremail,$server,$domdesc,$contact_name, - $contact_email,$courseid); + $contact_email,$courseid,$inventory); } return $output; } @@ -583,7 +584,8 @@ sub call_rulecheck { } sub send_token { - my ($domain,$email,$server,$domdesc,$contact_name,$contact_email,$courseid) = @_; + my ($domain,$email,$server,$domdesc,$contact_name,$contact_email,$courseid, + $inventory) = @_; my $msg = '

'.&mt('Account creation status').'

'. &mt('Thank you for your request to create a new LON-CAPA account.'). '

'; @@ -597,7 +599,7 @@ sub send_token { if ($token !~ /^error/ && $token ne 'no_such_host') { my $esc_token = &escape($token); my $showtime = localtime(time); - my $mailmsg = &mt('A request was submitted on [_1] for creation of a GCI WebCenter account.',$showtime)." \n". + my $mailmsg = &mt('A request was submitted on [_1] for creation of a [_2] WebCenter account.',$showtime,$inventory)." \n". &mt('To complete this process please open a web browser and enter the following URL in the address/location box: [_1]', "\n\n".&Apache::lonnet::absolute_url().'/adm/createaccount?token='.$esc_token); my $result = &Apache::resetpw::send_mail($domdesc,$email,$mailmsg,$contact_name, @@ -619,7 +621,7 @@ sub send_token { sub process_mailtoken { my ($r,$token,$contact_name,$contact_email,$domain,$domdesc,$lonhost, - $include,$start_page) = @_; + $include,$start_page,$inventory) = @_; my ($msg,$nostart,$noend); my %data = &Apache::lonnet::tmpget($token); my $now = time; @@ -639,7 +641,7 @@ sub process_mailtoken { if ($result eq 'ok') { $msg = $output; my $shownow = &Apache::lonlocal::locallocaltime($now); - my $mailmsg = &mt('A GCI WebCenter account has been created [_1] from IP address: [_2]. If you did not perform this action or authorize it, please contact the [_3] ([_4]).',$shownow,$ENV{'REMOTE_ADDR'},$contact_name,$contact_email)."\n"; + my $mailmsg = &mt('A [_1] WebCenter account has been created [_2] from IP address: [_3]. If you did not perform this action or authorize it, please contact the [_4] ([_5]).',$inventory,$shownow,$ENV{'REMOTE_ADDR'},$contact_name,$contact_email)."\n"; my $mailresult = &Apache::resetpw::send_mail($domdesc,$data{'email'}, $mailmsg,$contact_name, $contact_email);